Skip to content
Snippets Groups Projects
Commit 06d40645 authored by Malte Bauch's avatar Malte Bauch
Browse files

Generate with --include-imports flag for java and python

parent e0a0cd3d
No related branches found
No related tags found
No related merge requests found
Showing
with 26560 additions and 0 deletions
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: buf/validate/validate.proto
// Protobuf Java Version: 3.25.0
package de.danet.buf.validate;
/**
* <pre>
* AnyRules describe constraints applied exclusively to the `google.protobuf.Any` well-known type.
* </pre>
*
* Protobuf type {@code buf.validate.AnyRules}
*/
public final class AnyRules extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:buf.validate.AnyRules)
AnyRulesOrBuilder {
private static final long serialVersionUID = 0L;
// Use AnyRules.newBuilder() to construct.
private AnyRules(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private AnyRules() {
in_ =
com.google.protobuf.LazyStringArrayList.emptyList();
notIn_ =
com.google.protobuf.LazyStringArrayList.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new AnyRules();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return de.danet.buf.validate.ValidateProto.internal_static_buf_validate_AnyRules_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return de.danet.buf.validate.ValidateProto.internal_static_buf_validate_AnyRules_fieldAccessorTable
.ensureFieldAccessorsInitialized(
de.danet.buf.validate.AnyRules.class, de.danet.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();
/**
* <pre>
* `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"]];
* }
* ```
* </pre>
*
* <code>repeated string in = 2 [json_name = "in"];</code>
* @return A list containing the in.
*/
public com.google.protobuf.ProtocolStringList
getInList() {
return in_;
}
/**
* <pre>
* `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"]];
* }
* ```
* </pre>
*
* <code>repeated string in = 2 [json_name = "in"];</code>
* @return The count of in.
*/
public int getInCount() {
return in_.size();
}
/**
* <pre>
* `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"]];
* }
* ```
* </pre>
*
* <code>repeated string in = 2 [json_name = "in"];</code>
* @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);
}
/**
* <pre>
* `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"]];
* }
* ```
* </pre>
*
* <code>repeated string in = 2 [json_name = "in"];</code>
* @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();
/**
* <pre>
* 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"]];
* }
* ```
* </pre>
*
* <code>repeated string not_in = 3 [json_name = "notIn"];</code>
* @return A list containing the notIn.
*/
public com.google.protobuf.ProtocolStringList
getNotInList() {
return notIn_;
}
/**
* <pre>
* 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"]];
* }
* ```
* </pre>
*
* <code>repeated string not_in = 3 [json_name = "notIn"];</code>
* @return The count of notIn.
*/
public int getNotInCount() {
return notIn_.size();
}
/**
* <pre>
* 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"]];
* }
* ```
* </pre>
*
* <code>repeated string not_in = 3 [json_name = "notIn"];</code>
* @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);
}
/**
* <pre>
* 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"]];
* }
* ```
* </pre>
*
* <code>repeated string not_in = 3 [json_name = "notIn"];</code>
* @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.GeneratedMessageV3.writeString(output, 2, in_.getRaw(i));
}
for (int i = 0; i < notIn_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.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 de.danet.buf.validate.AnyRules)) {
return super.equals(obj);
}
de.danet.buf.validate.AnyRules other = (de.danet.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 de.danet.buf.validate.AnyRules parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static de.danet.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 de.danet.buf.validate.AnyRules parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static de.danet.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 de.danet.buf.validate.AnyRules parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static de.danet.buf.validate.AnyRules parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static de.danet.buf.validate.AnyRules parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static de.danet.buf.validate.AnyRules parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static de.danet.buf.validate.AnyRules parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static de.danet.buf.validate.AnyRules parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static de.danet.buf.validate.AnyRules parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static de.danet.buf.validate.AnyRules parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(de.danet.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.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* AnyRules describe constraints applied exclusively to the `google.protobuf.Any` well-known type.
* </pre>
*
* Protobuf type {@code buf.validate.AnyRules}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:buf.validate.AnyRules)
de.danet.buf.validate.AnyRulesOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return de.danet.buf.validate.ValidateProto.internal_static_buf_validate_AnyRules_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return de.danet.buf.validate.ValidateProto.internal_static_buf_validate_AnyRules_fieldAccessorTable
.ensureFieldAccessorsInitialized(
de.danet.buf.validate.AnyRules.class, de.danet.buf.validate.AnyRules.Builder.class);
}
// Construct using de.danet.buf.validate.AnyRules.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.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 de.danet.buf.validate.ValidateProto.internal_static_buf_validate_AnyRules_descriptor;
}
@java.lang.Override
public de.danet.buf.validate.AnyRules getDefaultInstanceForType() {
return de.danet.buf.validate.AnyRules.getDefaultInstance();
}
@java.lang.Override
public de.danet.buf.validate.AnyRules build() {
de.danet.buf.validate.AnyRules result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public de.danet.buf.validate.AnyRules buildPartial() {
de.danet.buf.validate.AnyRules result = new de.danet.buf.validate.AnyRules(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(de.danet.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 clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof de.danet.buf.validate.AnyRules) {
return mergeFrom((de.danet.buf.validate.AnyRules)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(de.danet.buf.validate.AnyRules other) {
if (other == de.danet.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: {
java.lang.String s = input.readStringRequireUtf8();
ensureInIsMutable();
in_.add(s);
break;
} // case 18
case 26: {
java.lang.String s = input.readStringRequireUtf8();
ensureNotInIsMutable();
notIn_.add(s);
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;
}
/**
* <pre>
* `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"]];
* }
* ```
* </pre>
*
* <code>repeated string in = 2 [json_name = "in"];</code>
* @return A list containing the in.
*/
public com.google.protobuf.ProtocolStringList
getInList() {
in_.makeImmutable();
return in_;
}
/**
* <pre>
* `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"]];
* }
* ```
* </pre>
*
* <code>repeated string in = 2 [json_name = "in"];</code>
* @return The count of in.
*/
public int getInCount() {
return in_.size();
}
/**
* <pre>
* `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"]];
* }
* ```
* </pre>
*
* <code>repeated string in = 2 [json_name = "in"];</code>
* @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);
}
/**
* <pre>
* `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"]];
* }
* ```
* </pre>
*
* <code>repeated string in = 2 [json_name = "in"];</code>
* @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);
}
/**
* <pre>
* `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"]];
* }
* ```
* </pre>
*
* <code>repeated string in = 2 [json_name = "in"];</code>
* @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;
}
/**
* <pre>
* `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"]];
* }
* ```
* </pre>
*
* <code>repeated string in = 2 [json_name = "in"];</code>
* @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;
}
/**
* <pre>
* `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"]];
* }
* ```
* </pre>
*
* <code>repeated string in = 2 [json_name = "in"];</code>
* @param values The in to add.
* @return This builder for chaining.
*/
public Builder addAllIn(
java.lang.Iterable<java.lang.String> values) {
ensureInIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, in_);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* <pre>
* `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"]];
* }
* ```
* </pre>
*
* <code>repeated string in = 2 [json_name = "in"];</code>
* @return This builder for chaining.
*/
public Builder clearIn() {
in_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);;
onChanged();
return this;
}
/**
* <pre>
* `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"]];
* }
* ```
* </pre>
*
* <code>repeated string in = 2 [json_name = "in"];</code>
* @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(); }
checkByteStringIsUtf8(value);
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;
}
/**
* <pre>
* 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"]];
* }
* ```
* </pre>
*
* <code>repeated string not_in = 3 [json_name = "notIn"];</code>
* @return A list containing the notIn.
*/
public com.google.protobuf.ProtocolStringList
getNotInList() {
notIn_.makeImmutable();
return notIn_;
}
/**
* <pre>
* 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"]];
* }
* ```
* </pre>
*
* <code>repeated string not_in = 3 [json_name = "notIn"];</code>
* @return The count of notIn.
*/
public int getNotInCount() {
return notIn_.size();
}
/**
* <pre>
* 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"]];
* }
* ```
* </pre>
*
* <code>repeated string not_in = 3 [json_name = "notIn"];</code>
* @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);
}
/**
* <pre>
* 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"]];
* }
* ```
* </pre>
*
* <code>repeated string not_in = 3 [json_name = "notIn"];</code>
* @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);
}
/**
* <pre>
* 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"]];
* }
* ```
* </pre>
*
* <code>repeated string not_in = 3 [json_name = "notIn"];</code>
* @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;
}
/**
* <pre>
* 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"]];
* }
* ```
* </pre>
*
* <code>repeated string not_in = 3 [json_name = "notIn"];</code>
* @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;
}
/**
* <pre>
* 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"]];
* }
* ```
* </pre>
*
* <code>repeated string not_in = 3 [json_name = "notIn"];</code>
* @param values The notIn to add.
* @return This builder for chaining.
*/
public Builder addAllNotIn(
java.lang.Iterable<java.lang.String> values) {
ensureNotInIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, notIn_);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* <pre>
* 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"]];
* }
* ```
* </pre>
*
* <code>repeated string not_in = 3 [json_name = "notIn"];</code>
* @return This builder for chaining.
*/
public Builder clearNotIn() {
notIn_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);;
onChanged();
return this;
}
/**
* <pre>
* 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"]];
* }
* ```
* </pre>
*
* <code>repeated string not_in = 3 [json_name = "notIn"];</code>
* @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(); }
checkByteStringIsUtf8(value);
ensureNotInIsMutable();
notIn_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:buf.validate.AnyRules)
}
// @@protoc_insertion_point(class_scope:buf.validate.AnyRules)
private static final de.danet.buf.validate.AnyRules DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new de.danet.buf.validate.AnyRules();
}
public static de.danet.buf.validate.AnyRules getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<AnyRules>
PARSER = new com.google.protobuf.AbstractParser<AnyRules>() {
@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<AnyRules> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<AnyRules> getParserForType() {
return PARSER;
}
@java.lang.Override
public de.danet.buf.validate.AnyRules getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: buf/validate/validate.proto
// Protobuf Java Version: 3.25.0
package de.danet.buf.validate;
public interface AnyRulesOrBuilder extends
// @@protoc_insertion_point(interface_extends:buf.validate.AnyRules)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* `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"]];
* }
* ```
* </pre>
*
* <code>repeated string in = 2 [json_name = "in"];</code>
* @return A list containing the in.
*/
java.util.List<java.lang.String>
getInList();
/**
* <pre>
* `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"]];
* }
* ```
* </pre>
*
* <code>repeated string in = 2 [json_name = "in"];</code>
* @return The count of in.
*/
int getInCount();
/**
* <pre>
* `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"]];
* }
* ```
* </pre>
*
* <code>repeated string in = 2 [json_name = "in"];</code>
* @param index The index of the element to return.
* @return The in at the given index.
*/
java.lang.String getIn(int index);
/**
* <pre>
* `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"]];
* }
* ```
* </pre>
*
* <code>repeated string in = 2 [json_name = "in"];</code>
* @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);
/**
* <pre>
* 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"]];
* }
* ```
* </pre>
*
* <code>repeated string not_in = 3 [json_name = "notIn"];</code>
* @return A list containing the notIn.
*/
java.util.List<java.lang.String>
getNotInList();
/**
* <pre>
* 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"]];
* }
* ```
* </pre>
*
* <code>repeated string not_in = 3 [json_name = "notIn"];</code>
* @return The count of notIn.
*/
int getNotInCount();
/**
* <pre>
* 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"]];
* }
* ```
* </pre>
*
* <code>repeated string not_in = 3 [json_name = "notIn"];</code>
* @param index The index of the element to return.
* @return The notIn at the given index.
*/
java.lang.String getNotIn(int index);
/**
* <pre>
* 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"]];
* }
* ```
* </pre>
*
* <code>repeated string not_in = 3 [json_name = "notIn"];</code>
* @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);
}
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: buf/validate/validate.proto
// Protobuf Java Version: 3.25.0
package de.danet.buf.validate;
/**
* <pre>
* BoolRules describes the constraints applied to `bool` values. These rules
* may also be applied to the `google.protobuf.BoolValue` Well-Known-Type.
* </pre>
*
* Protobuf type {@code buf.validate.BoolRules}
*/
public final class BoolRules extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:buf.validate.BoolRules)
BoolRulesOrBuilder {
private static final long serialVersionUID = 0L;
// Use BoolRules.newBuilder() to construct.
private BoolRules(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private BoolRules() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new BoolRules();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return de.danet.buf.validate.ValidateProto.internal_static_buf_validate_BoolRules_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return de.danet.buf.validate.ValidateProto.internal_static_buf_validate_BoolRules_fieldAccessorTable
.ensureFieldAccessorsInitialized(
de.danet.buf.validate.BoolRules.class, de.danet.buf.validate.BoolRules.Builder.class);
}
private int bitField0_;
public static final int CONST_FIELD_NUMBER = 1;
private boolean const_ = false;
/**
* <pre>
* `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];
* }
* ```
* </pre>
*
* <code>optional bool const = 1 [json_name = "const", (.buf.validate.priv.field) = { ... }</code>
* @return Whether the const field is set.
*/
@java.lang.Override
public boolean hasConst() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* <pre>
* `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];
* }
* ```
* </pre>
*
* <code>optional bool const = 1 [json_name = "const", (.buf.validate.priv.field) = { ... }</code>
* @return The const.
*/
@java.lang.Override
public boolean getConst() {
return const_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (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, const_);
}
getUnknownFields().writeTo(output);
}
@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_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof de.danet.buf.validate.BoolRules)) {
return super.equals(obj);
}
de.danet.buf.validate.BoolRules other = (de.danet.buf.validate.BoolRules) obj;
if (hasConst() != other.hasConst()) return false;
if (hasConst()) {
if (getConst()
!= other.getConst()) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) 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());
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static de.danet.buf.validate.BoolRules parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static de.danet.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 de.danet.buf.validate.BoolRules parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static de.danet.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 de.danet.buf.validate.BoolRules parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static de.danet.buf.validate.BoolRules parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static de.danet.buf.validate.BoolRules parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static de.danet.buf.validate.BoolRules parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static de.danet.buf.validate.BoolRules parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static de.danet.buf.validate.BoolRules parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static de.danet.buf.validate.BoolRules parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static de.danet.buf.validate.BoolRules parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(de.danet.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.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* BoolRules describes the constraints applied to `bool` values. These rules
* may also be applied to the `google.protobuf.BoolValue` Well-Known-Type.
* </pre>
*
* Protobuf type {@code buf.validate.BoolRules}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:buf.validate.BoolRules)
de.danet.buf.validate.BoolRulesOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return de.danet.buf.validate.ValidateProto.internal_static_buf_validate_BoolRules_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return de.danet.buf.validate.ValidateProto.internal_static_buf_validate_BoolRules_fieldAccessorTable
.ensureFieldAccessorsInitialized(
de.danet.buf.validate.BoolRules.class, de.danet.buf.validate.BoolRules.Builder.class);
}
// Construct using de.danet.buf.validate.BoolRules.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
const_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return de.danet.buf.validate.ValidateProto.internal_static_buf_validate_BoolRules_descriptor;
}
@java.lang.Override
public de.danet.buf.validate.BoolRules getDefaultInstanceForType() {
return de.danet.buf.validate.BoolRules.getDefaultInstance();
}
@java.lang.Override
public de.danet.buf.validate.BoolRules build() {
de.danet.buf.validate.BoolRules result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public de.danet.buf.validate.BoolRules buildPartial() {
de.danet.buf.validate.BoolRules result = new de.danet.buf.validate.BoolRules(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(de.danet.buf.validate.BoolRules result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.const_ = const_;
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof de.danet.buf.validate.BoolRules) {
return mergeFrom((de.danet.buf.validate.BoolRules)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(de.danet.buf.validate.BoolRules other) {
if (other == de.danet.buf.validate.BoolRules.getDefaultInstance()) return this;
if (other.hasConst()) {
setConst(other.getConst());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
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
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
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_ ;
/**
* <pre>
* `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];
* }
* ```
* </pre>
*
* <code>optional bool const = 1 [json_name = "const", (.buf.validate.priv.field) = { ... }</code>
* @return Whether the const field is set.
*/
@java.lang.Override
public boolean hasConst() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* <pre>
* `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];
* }
* ```
* </pre>
*
* <code>optional bool const = 1 [json_name = "const", (.buf.validate.priv.field) = { ... }</code>
* @return The const.
*/
@java.lang.Override
public boolean getConst() {
return const_;
}
/**
* <pre>
* `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];
* }
* ```
* </pre>
*
* <code>optional bool const = 1 [json_name = "const", (.buf.validate.priv.field) = { ... }</code>
* @param value The const to set.
* @return This builder for chaining.
*/
public Builder setConst(boolean value) {
const_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* <pre>
* `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];
* }
* ```
* </pre>
*
* <code>optional bool const = 1 [json_name = "const", (.buf.validate.priv.field) = { ... }</code>
* @return This builder for chaining.
*/
public Builder clearConst() {
bitField0_ = (bitField0_ & ~0x00000001);
const_ = false;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:buf.validate.BoolRules)
}
// @@protoc_insertion_point(class_scope:buf.validate.BoolRules)
private static final de.danet.buf.validate.BoolRules DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new de.danet.buf.validate.BoolRules();
}
public static de.danet.buf.validate.BoolRules getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<BoolRules>
PARSER = new com.google.protobuf.AbstractParser<BoolRules>() {
@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<BoolRules> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<BoolRules> getParserForType() {
return PARSER;
}
@java.lang.Override
public de.danet.buf.validate.BoolRules getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: buf/validate/validate.proto
// Protobuf Java Version: 3.25.0
package de.danet.buf.validate;
public interface BoolRulesOrBuilder extends
// @@protoc_insertion_point(interface_extends:buf.validate.BoolRules)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* `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];
* }
* ```
* </pre>
*
* <code>optional bool const = 1 [json_name = "const", (.buf.validate.priv.field) = { ... }</code>
* @return Whether the const field is set.
*/
boolean hasConst();
/**
* <pre>
* `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];
* }
* ```
* </pre>
*
* <code>optional bool const = 1 [json_name = "const", (.buf.validate.priv.field) = { ... }</code>
* @return The const.
*/
boolean getConst();
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: buf/validate/expression.proto
// Protobuf Java Version: 3.25.0
package de.danet.buf.validate;
public interface ConstraintOrBuilder extends
// @@protoc_insertion_point(interface_extends:buf.validate.Constraint)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* `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.
* </pre>
*
* <code>string id = 1 [json_name = "id"];</code>
* @return The id.
*/
java.lang.String getId();
/**
* <pre>
* `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.
* </pre>
*
* <code>string id = 1 [json_name = "id"];</code>
* @return The bytes for id.
*/
com.google.protobuf.ByteString
getIdBytes();
/**
* <pre>
* `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.
* </pre>
*
* <code>string message = 2 [json_name = "message"];</code>
* @return The message.
*/
java.lang.String getMessage();
/**
* <pre>
* `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.
* </pre>
*
* <code>string message = 2 [json_name = "message"];</code>
* @return The bytes for message.
*/
com.google.protobuf.ByteString
getMessageBytes();
/**
* <pre>
* `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.
* </pre>
*
* <code>string expression = 3 [json_name = "expression"];</code>
* @return The expression.
*/
java.lang.String getExpression();
/**
* <pre>
* `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.
* </pre>
*
* <code>string expression = 3 [json_name = "expression"];</code>
* @return The bytes for expression.
*/
com.google.protobuf.ByteString
getExpressionBytes();
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment