getParserForType() {
}
}
- private int valueModeCase_ = 0;
-
- @SuppressWarnings("serial")
- private java.lang.Object valueMode_;
+ public interface SearchConfigOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.Index.IndexField.SearchConfig)
+ com.google.protobuf.MessageOrBuilder {
- public enum ValueModeCase
- implements
- com.google.protobuf.Internal.EnumLite,
- com.google.protobuf.AbstractMessage.InternalOneOfEnum {
- ORDER(2),
- ARRAY_CONFIG(3),
- VECTOR_CONFIG(4),
- VALUEMODE_NOT_SET(0);
- private final int value;
+ /**
+ *
+ *
+ *
+ * Optional. The specification for building a text search index for a
+ * field.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec text_spec = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the textSpec field is set.
+ */
+ boolean hasTextSpec();
- private ValueModeCase(int value) {
- this.value = value;
- }
+ /**
+ *
+ *
+ *
+ * Optional. The specification for building a text search index for a
+ * field.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec text_spec = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The textSpec.
+ */
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec getTextSpec();
/**
- * @param value The number of the enum to look for.
- * @return The enum associated with the given number.
- * @deprecated Use {@link #forNumber(int)} instead.
+ *
+ *
+ *
+ * Optional. The specification for building a text search index for a
+ * field.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec text_spec = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
*/
- @java.lang.Deprecated
- public static ValueModeCase valueOf(int value) {
- return forNumber(value);
- }
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpecOrBuilder
+ getTextSpecOrBuilder();
- public static ValueModeCase forNumber(int value) {
- switch (value) {
- case 2:
- return ORDER;
- case 3:
- return ARRAY_CONFIG;
- case 4:
- return VECTOR_CONFIG;
- case 0:
- return VALUEMODE_NOT_SET;
- default:
- return null;
- }
- }
+ /**
+ *
+ *
+ *
+ * Optional. The specification for building a geo search index for a
+ * field.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec geo_spec = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the geoSpec field is set.
+ */
+ boolean hasGeoSpec();
- public int getNumber() {
- return this.value;
- }
- };
+ /**
+ *
+ *
+ *
+ * Optional. The specification for building a geo search index for a
+ * field.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec geo_spec = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The geoSpec.
+ */
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec getGeoSpec();
- public ValueModeCase getValueModeCase() {
- return ValueModeCase.forNumber(valueModeCase_);
+ /**
+ *
+ *
+ *
+ * Optional. The specification for building a geo search index for a
+ * field.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec geo_spec = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpecOrBuilder
+ getGeoSpecOrBuilder();
}
- public static final int FIELD_PATH_FIELD_NUMBER = 1;
-
- @SuppressWarnings("serial")
- private volatile java.lang.Object fieldPath_ = "";
-
/**
*
*
*
- * Can be __name__.
- * For single field indexes, this must match the name of the field or may
- * be omitted.
+ * The configuration for how to index a field for search.
*
*
- * string field_path = 1;
- *
- * @return The fieldPath.
+ * Protobuf type {@code google.firestore.admin.v1.Index.IndexField.SearchConfig}
*/
- @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();
- fieldPath_ = s;
- return s;
- }
- }
+ public static final class SearchConfig extends com.google.protobuf.GeneratedMessage
+ implements
+ // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.Index.IndexField.SearchConfig)
+ SearchConfigOrBuilder {
+ private static final long serialVersionUID = 0L;
- /**
- *
- *
- *
- * Can be __name__.
- * For single field indexes, this must match the name of the field or may
- * be omitted.
- *
- *
- * string field_path = 1;
- *
- * @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;
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 33,
+ /* patch= */ 2,
+ /* suffix= */ "",
+ "SearchConfig");
}
- }
- public static final int ORDER_FIELD_NUMBER = 2;
+ // Use SearchConfig.newBuilder() to construct.
+ private SearchConfig(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ }
- /**
- *
- *
- *
- * Indicates that this field supports ordering by the specified order or
- * comparing using =, !=, <, <=, >, >=.
- *
- *
- * .google.firestore.admin.v1.Index.IndexField.Order order = 2;
- *
- * @return Whether the order field is set.
- */
- public boolean hasOrder() {
- return valueModeCase_ == 2;
- }
+ private SearchConfig() {}
- /**
- *
- *
- *
- * Indicates that this field supports ordering by the specified order or
- * comparing using =, !=, <, <=, >, >=.
- *
- *
- * .google.firestore.admin.v1.Index.IndexField.Order order = 2;
- *
- * @return The enum numeric value on the wire for order.
- */
- public int getOrderValue() {
- if (valueModeCase_ == 2) {
- return (java.lang.Integer) valueMode_;
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.firestore.admin.v1.IndexProto
+ .internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_descriptor;
}
- return 0;
- }
- /**
- *
- *
- *
- * Indicates that this field supports ordering by the specified order or
- * comparing using =, !=, <, <=, >, >=.
- *
- *
- * .google.firestore.admin.v1.Index.IndexField.Order order = 2;
- *
- * @return The order.
- */
- public com.google.firestore.admin.v1.Index.IndexField.Order getOrder() {
- if (valueModeCase_ == 2) {
- com.google.firestore.admin.v1.Index.IndexField.Order result =
- com.google.firestore.admin.v1.Index.IndexField.Order.forNumber(
- (java.lang.Integer) valueMode_);
- return result == null
- ? com.google.firestore.admin.v1.Index.IndexField.Order.UNRECOGNIZED
- : result;
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.firestore.admin.v1.IndexProto
+ .internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.class,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.Builder.class);
}
- return com.google.firestore.admin.v1.Index.IndexField.Order.ORDER_UNSPECIFIED;
- }
-
- public static final int ARRAY_CONFIG_FIELD_NUMBER = 3;
-
- /**
- *
- *
- *
- * Indicates that this field supports operations on `array_value`s.
- *
- *
- * .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3;
- *
- * @return Whether the arrayConfig field is set.
- */
- public boolean hasArrayConfig() {
- return valueModeCase_ == 3;
- }
- /**
- *
- *
- *
+ /**
+ *
+ *
+ *
+ * Ways to index the text field value.
+ *
+ *
+ * Protobuf enum {@code google.firestore.admin.v1.Index.IndexField.SearchConfig.TextIndexType}
+ */
+ public enum TextIndexType implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ *
+ *
+ *
+ * The index type is unspecified. Not a valid option.
+ *
+ *
+ * TEXT_INDEX_TYPE_UNSPECIFIED = 0;
+ */
+ TEXT_INDEX_TYPE_UNSPECIFIED(0),
+ /**
+ *
+ *
+ *
+ * Field values are tokenized. This is the only way currently supported
+ * for MONGODB_COMPATIBLE_API.
+ *
+ *
+ * TOKENIZED = 1;
+ */
+ TOKENIZED(1),
+ UNRECOGNIZED(-1),
+ ;
+
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 33,
+ /* patch= */ 2,
+ /* suffix= */ "",
+ "TextIndexType");
+ }
+
+ /**
+ *
+ *
+ *
+ * The index type is unspecified. Not a valid option.
+ *
+ *
+ * TEXT_INDEX_TYPE_UNSPECIFIED = 0;
+ */
+ public static final int TEXT_INDEX_TYPE_UNSPECIFIED_VALUE = 0;
+
+ /**
+ *
+ *
+ *
+ * Field values are tokenized. This is the only way currently supported
+ * for MONGODB_COMPATIBLE_API.
+ *
+ *
+ * TOKENIZED = 1;
+ */
+ public static final int TOKENIZED_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 TextIndexType 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 TextIndexType forNumber(int value) {
+ switch (value) {
+ case 0:
+ return TEXT_INDEX_TYPE_UNSPECIFIED;
+ case 1:
+ return TOKENIZED;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ internalGetValueMap() {
+ return internalValueMap;
+ }
+
+ private static final com.google.protobuf.Internal.EnumLiteMap
+ internalValueMap =
+ new com.google.protobuf.Internal.EnumLiteMap() {
+ public TextIndexType findValueByNumber(int number) {
+ return TextIndexType.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
+ return com.google.firestore.admin.v1.Index.IndexField.SearchConfig.getDescriptor()
+ .getEnumTypes()
+ .get(0);
+ }
+
+ private static final TextIndexType[] VALUES = values();
+
+ public static TextIndexType 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 TextIndexType(int value) {
+ this.value = value;
+ }
+
+ // @@protoc_insertion_point(enum_scope:google.firestore.admin.v1.Index.IndexField.SearchConfig.TextIndexType)
+ }
+
+ /**
+ *
+ *
+ *
+ * Types of text matches that are supported for the
+ * field.
+ *
+ *
+ * Protobuf enum {@code google.firestore.admin.v1.Index.IndexField.SearchConfig.TextMatchType}
+ */
+ public enum TextMatchType implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ *
+ *
+ *
+ * The match type is unspecified. Not a valid option.
+ *
+ *
+ * TEXT_MATCH_TYPE_UNSPECIFIED = 0;
+ */
+ TEXT_MATCH_TYPE_UNSPECIFIED(0),
+ /**
+ *
+ *
+ *
+ * Match on any indexed field. This is the only way currently supported
+ * for MONGODB_COMPATIBLE_API.
+ *
+ *
+ * MATCH_GLOBALLY = 1;
+ */
+ MATCH_GLOBALLY(1),
+ UNRECOGNIZED(-1),
+ ;
+
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 33,
+ /* patch= */ 2,
+ /* suffix= */ "",
+ "TextMatchType");
+ }
+
+ /**
+ *
+ *
+ *
+ * The match type is unspecified. Not a valid option.
+ *
+ *
+ * TEXT_MATCH_TYPE_UNSPECIFIED = 0;
+ */
+ public static final int TEXT_MATCH_TYPE_UNSPECIFIED_VALUE = 0;
+
+ /**
+ *
+ *
+ *
+ * Match on any indexed field. This is the only way currently supported
+ * for MONGODB_COMPATIBLE_API.
+ *
+ *
+ * MATCH_GLOBALLY = 1;
+ */
+ public static final int MATCH_GLOBALLY_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 TextMatchType 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 TextMatchType forNumber(int value) {
+ switch (value) {
+ case 0:
+ return TEXT_MATCH_TYPE_UNSPECIFIED;
+ case 1:
+ return MATCH_GLOBALLY;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ internalGetValueMap() {
+ return internalValueMap;
+ }
+
+ private static final com.google.protobuf.Internal.EnumLiteMap
+ internalValueMap =
+ new com.google.protobuf.Internal.EnumLiteMap() {
+ public TextMatchType findValueByNumber(int number) {
+ return TextMatchType.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
+ return com.google.firestore.admin.v1.Index.IndexField.SearchConfig.getDescriptor()
+ .getEnumTypes()
+ .get(1);
+ }
+
+ private static final TextMatchType[] VALUES = values();
+
+ public static TextMatchType 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 TextMatchType(int value) {
+ this.value = value;
+ }
+
+ // @@protoc_insertion_point(enum_scope:google.firestore.admin.v1.Index.IndexField.SearchConfig.TextMatchType)
+ }
+
+ public interface SearchTextIndexSpecOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ *
+ * Required. How to index the text field value.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.TextIndexType index_type = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The enum numeric value on the wire for indexType.
+ */
+ int getIndexTypeValue();
+
+ /**
+ *
+ *
+ *
+ * Required. How to index the text field value.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.TextIndexType index_type = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The indexType.
+ */
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.TextIndexType getIndexType();
+
+ /**
+ *
+ *
+ *
+ * Required. How to match the text field value.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.TextMatchType match_type = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The enum numeric value on the wire for matchType.
+ */
+ int getMatchTypeValue();
+
+ /**
+ *
+ *
+ *
+ * Required. How to match the text field value.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.TextMatchType match_type = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The matchType.
+ */
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.TextMatchType getMatchType();
+ }
+
+ /**
+ *
+ *
+ *
+ * Specification of how the field should be indexed for search text
+ * indexes.
+ *
+ *
+ * Protobuf type {@code
+ * google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec}
+ */
+ public static final class SearchTextIndexSpec extends com.google.protobuf.GeneratedMessage
+ implements
+ // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec)
+ SearchTextIndexSpecOrBuilder {
+ private static final long serialVersionUID = 0L;
+
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 33,
+ /* patch= */ 2,
+ /* suffix= */ "",
+ "SearchTextIndexSpec");
+ }
+
+ // Use SearchTextIndexSpec.newBuilder() to construct.
+ private SearchTextIndexSpec(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ }
+
+ private SearchTextIndexSpec() {
+ indexType_ = 0;
+ matchType_ = 0;
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.firestore.admin.v1.IndexProto
+ .internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_SearchTextIndexSpec_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.firestore.admin.v1.IndexProto
+ .internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_SearchTextIndexSpec_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec
+ .class,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec
+ .Builder.class);
+ }
+
+ public static final int INDEX_TYPE_FIELD_NUMBER = 1;
+ private int indexType_ = 0;
+
+ /**
+ *
+ *
+ *
+ * Required. How to index the text field value.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.TextIndexType index_type = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The enum numeric value on the wire for indexType.
+ */
+ @java.lang.Override
+ public int getIndexTypeValue() {
+ return indexType_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. How to index the text field value.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.TextIndexType index_type = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The indexType.
+ */
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig.TextIndexType
+ getIndexType() {
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.TextIndexType result =
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.TextIndexType.forNumber(
+ indexType_);
+ return result == null
+ ? com.google.firestore.admin.v1.Index.IndexField.SearchConfig.TextIndexType
+ .UNRECOGNIZED
+ : result;
+ }
+
+ public static final int MATCH_TYPE_FIELD_NUMBER = 2;
+ private int matchType_ = 0;
+
+ /**
+ *
+ *
+ *
+ * Required. How to match the text field value.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.TextMatchType match_type = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The enum numeric value on the wire for matchType.
+ */
+ @java.lang.Override
+ public int getMatchTypeValue() {
+ return matchType_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. How to match the text field value.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.TextMatchType match_type = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The matchType.
+ */
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig.TextMatchType
+ getMatchType() {
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.TextMatchType result =
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.TextMatchType.forNumber(
+ matchType_);
+ return result == null
+ ? com.google.firestore.admin.v1.Index.IndexField.SearchConfig.TextMatchType
+ .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 (indexType_
+ != com.google.firestore.admin.v1.Index.IndexField.SearchConfig.TextIndexType
+ .TEXT_INDEX_TYPE_UNSPECIFIED
+ .getNumber()) {
+ output.writeEnum(1, indexType_);
+ }
+ if (matchType_
+ != com.google.firestore.admin.v1.Index.IndexField.SearchConfig.TextMatchType
+ .TEXT_MATCH_TYPE_UNSPECIFIED
+ .getNumber()) {
+ output.writeEnum(2, matchType_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (indexType_
+ != com.google.firestore.admin.v1.Index.IndexField.SearchConfig.TextIndexType
+ .TEXT_INDEX_TYPE_UNSPECIFIED
+ .getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, indexType_);
+ }
+ if (matchType_
+ != com.google.firestore.admin.v1.Index.IndexField.SearchConfig.TextMatchType
+ .TEXT_MATCH_TYPE_UNSPECIFIED
+ .getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, matchType_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj
+ instanceof
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec)) {
+ return super.equals(obj);
+ }
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec other =
+ (com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec) obj;
+
+ if (indexType_ != other.indexType_) return false;
+ if (matchType_ != other.matchType_) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + INDEX_TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + indexType_;
+ hash = (37 * hash) + MATCH_TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + matchType_;
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchTextIndexSpec
+ parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchTextIndexSpec
+ parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchTextIndexSpec
+ parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchTextIndexSpec
+ parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchTextIndexSpec
+ parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchTextIndexSpec
+ parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchTextIndexSpec
+ parseFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchTextIndexSpec
+ parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchTextIndexSpec
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchTextIndexSpec
+ parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchTextIndexSpec
+ parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchTextIndexSpec
+ parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec
+ prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /**
+ *
+ *
+ *
+ * Specification of how the field should be indexed for search text
+ * indexes.
+ *
+ *
+ * Protobuf type {@code
+ * google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec}
+ */
+ public static final class Builder
+ extends com.google.protobuf.GeneratedMessage.Builder
+ implements
+ // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec)
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchTextIndexSpecOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.firestore.admin.v1.IndexProto
+ .internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_SearchTextIndexSpec_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.firestore.admin.v1.IndexProto
+ .internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_SearchTextIndexSpec_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec
+ .class,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec
+ .Builder.class);
+ }
+
+ // Construct using
+ // com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec.newBuilder()
+ private Builder() {}
+
+ private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+ }
+
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ indexType_ = 0;
+ matchType_ = 0;
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.firestore.admin.v1.IndexProto
+ .internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_SearchTextIndexSpec_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec
+ getDefaultInstanceForType() {
+ return com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec
+ .getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec
+ build() {
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec result =
+ buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec
+ buildPartial() {
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec result =
+ new com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec(
+ this);
+ if (bitField0_ != 0) {
+ buildPartial0(result);
+ }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec
+ result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.indexType_ = indexType_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.matchType_ = matchType_;
+ }
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other
+ instanceof
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec) {
+ return mergeFrom(
+ (com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec)
+ other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec
+ other) {
+ if (other
+ == com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec
+ .getDefaultInstance()) return this;
+ if (other.indexType_ != 0) {
+ setIndexTypeValue(other.getIndexTypeValue());
+ }
+ if (other.matchType_ != 0) {
+ setMatchTypeValue(other.getMatchTypeValue());
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 8:
+ {
+ indexType_ = input.readEnum();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 8
+ case 16:
+ {
+ matchType_ = input.readEnum();
+ 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 indexType_ = 0;
+
+ /**
+ *
+ *
+ *
+ * Required. How to index the text field value.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.TextIndexType index_type = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The enum numeric value on the wire for indexType.
+ */
+ @java.lang.Override
+ public int getIndexTypeValue() {
+ return indexType_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. How to index the text field value.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.TextIndexType index_type = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @param value The enum numeric value on the wire for indexType to set.
+ * @return This builder for chaining.
+ */
+ public Builder setIndexTypeValue(int value) {
+ indexType_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. How to index the text field value.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.TextIndexType index_type = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The indexType.
+ */
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig.TextIndexType
+ getIndexType() {
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.TextIndexType result =
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.TextIndexType.forNumber(
+ indexType_);
+ return result == null
+ ? com.google.firestore.admin.v1.Index.IndexField.SearchConfig.TextIndexType
+ .UNRECOGNIZED
+ : result;
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. How to index the text field value.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.TextIndexType index_type = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @param value The indexType to set.
+ * @return This builder for chaining.
+ */
+ public Builder setIndexType(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.TextIndexType value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ indexType_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. How to index the text field value.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.TextIndexType index_type = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearIndexType() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ indexType_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int matchType_ = 0;
+
+ /**
+ *
+ *
+ *
+ * Required. How to match the text field value.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.TextMatchType match_type = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The enum numeric value on the wire for matchType.
+ */
+ @java.lang.Override
+ public int getMatchTypeValue() {
+ return matchType_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. How to match the text field value.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.TextMatchType match_type = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @param value The enum numeric value on the wire for matchType to set.
+ * @return This builder for chaining.
+ */
+ public Builder setMatchTypeValue(int value) {
+ matchType_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. How to match the text field value.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.TextMatchType match_type = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The matchType.
+ */
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig.TextMatchType
+ getMatchType() {
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.TextMatchType result =
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.TextMatchType.forNumber(
+ matchType_);
+ return result == null
+ ? com.google.firestore.admin.v1.Index.IndexField.SearchConfig.TextMatchType
+ .UNRECOGNIZED
+ : result;
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. How to match the text field value.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.TextMatchType match_type = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @param value The matchType to set.
+ * @return This builder for chaining.
+ */
+ public Builder setMatchType(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.TextMatchType value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ matchType_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. How to match the text field value.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.TextMatchType match_type = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearMatchType() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ matchType_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec)
+ private static final com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchTextIndexSpec
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE =
+ new com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec();
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchTextIndexSpec
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public SearchTextIndexSpec parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException()
+ .setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec
+ getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+ }
+
+ public interface SearchTextSpecOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ *
+ * Required. Specifications for how the field should be indexed.
+ * Repeated so that the field can be indexed in multiple ways.
+ *
+ *
+ *
+ * repeated .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec index_specs = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ java.util.List<
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec>
+ getIndexSpecsList();
+
+ /**
+ *
+ *
+ *
+ * Required. Specifications for how the field should be indexed.
+ * Repeated so that the field can be indexed in multiple ways.
+ *
+ *
+ *
+ * repeated .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec index_specs = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec
+ getIndexSpecs(int index);
+
+ /**
+ *
+ *
+ *
+ * Required. Specifications for how the field should be indexed.
+ * Repeated so that the field can be indexed in multiple ways.
+ *
+ *
+ *
+ * repeated .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec index_specs = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ int getIndexSpecsCount();
+
+ /**
+ *
+ *
+ *
+ * Required. Specifications for how the field should be indexed.
+ * Repeated so that the field can be indexed in multiple ways.
+ *
+ *
+ *
+ * repeated .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec index_specs = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ java.util.List<
+ ? extends
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchTextIndexSpecOrBuilder>
+ getIndexSpecsOrBuilderList();
+
+ /**
+ *
+ *
+ *
+ * Required. Specifications for how the field should be indexed.
+ * Repeated so that the field can be indexed in multiple ways.
+ *
+ *
+ *
+ * repeated .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec index_specs = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpecOrBuilder
+ getIndexSpecsOrBuilder(int index);
+ }
+
+ /**
+ *
+ *
+ *
+ * The specification for how to build a text search index for a field.
+ *
+ *
+ * Protobuf type {@code
+ * google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec}
+ */
+ public static final class SearchTextSpec extends com.google.protobuf.GeneratedMessage
+ implements
+ // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec)
+ SearchTextSpecOrBuilder {
+ private static final long serialVersionUID = 0L;
+
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 33,
+ /* patch= */ 2,
+ /* suffix= */ "",
+ "SearchTextSpec");
+ }
+
+ // Use SearchTextSpec.newBuilder() to construct.
+ private SearchTextSpec(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ }
+
+ private SearchTextSpec() {
+ indexSpecs_ = java.util.Collections.emptyList();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.firestore.admin.v1.IndexProto
+ .internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_SearchTextSpec_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.firestore.admin.v1.IndexProto
+ .internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_SearchTextSpec_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec.class,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec.Builder
+ .class);
+ }
+
+ public static final int INDEX_SPECS_FIELD_NUMBER = 1;
+
+ @SuppressWarnings("serial")
+ private java.util.List<
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec>
+ indexSpecs_;
+
+ /**
+ *
+ *
+ *
+ * Required. Specifications for how the field should be indexed.
+ * Repeated so that the field can be indexed in multiple ways.
+ *
+ *
+ *
+ * repeated .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec index_specs = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ @java.lang.Override
+ public java.util.List<
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec>
+ getIndexSpecsList() {
+ return indexSpecs_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. Specifications for how the field should be indexed.
+ * Repeated so that the field can be indexed in multiple ways.
+ *
+ *
+ *
+ * repeated .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec index_specs = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ @java.lang.Override
+ public java.util.List<
+ ? extends
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchTextIndexSpecOrBuilder>
+ getIndexSpecsOrBuilderList() {
+ return indexSpecs_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. Specifications for how the field should be indexed.
+ * Repeated so that the field can be indexed in multiple ways.
+ *
+ *
+ *
+ * repeated .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec index_specs = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ @java.lang.Override
+ public int getIndexSpecsCount() {
+ return indexSpecs_.size();
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. Specifications for how the field should be indexed.
+ * Repeated so that the field can be indexed in multiple ways.
+ *
+ *
+ *
+ * repeated .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec index_specs = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec
+ getIndexSpecs(int index) {
+ return indexSpecs_.get(index);
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. Specifications for how the field should be indexed.
+ * Repeated so that the field can be indexed in multiple ways.
+ *
+ *
+ *
+ * repeated .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec index_specs = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchTextIndexSpecOrBuilder
+ getIndexSpecsOrBuilder(int index) {
+ return indexSpecs_.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 < indexSpecs_.size(); i++) {
+ output.writeMessage(1, indexSpecs_.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 < indexSpecs_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, indexSpecs_.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
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec)) {
+ return super.equals(obj);
+ }
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec other =
+ (com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec) obj;
+
+ if (!getIndexSpecsList().equals(other.getIndexSpecsList())) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getIndexSpecsCount() > 0) {
+ hash = (37 * hash) + INDEX_SPECS_FIELD_NUMBER;
+ hash = (53 * hash) + getIndexSpecsList().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec
+ parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec
+ parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec
+ parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec
+ parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec
+ parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec
+ parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec
+ parseFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec
+ parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec
+ parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec
+ parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec
+ parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new 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 specification for how to build a text search index for a field.
+ *
+ *
+ * Protobuf type {@code
+ * google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec}
+ */
+ public static final class Builder
+ extends com.google.protobuf.GeneratedMessage.Builder
+ implements
+ // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec)
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpecOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.firestore.admin.v1.IndexProto
+ .internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_SearchTextSpec_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.firestore.admin.v1.IndexProto
+ .internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_SearchTextSpec_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec
+ .class,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec
+ .Builder.class);
+ }
+
+ // Construct using
+ // com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec.newBuilder()
+ private Builder() {}
+
+ private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+ }
+
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ if (indexSpecsBuilder_ == null) {
+ indexSpecs_ = java.util.Collections.emptyList();
+ } else {
+ indexSpecs_ = null;
+ indexSpecsBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000001);
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.firestore.admin.v1.IndexProto
+ .internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_SearchTextSpec_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec
+ getDefaultInstanceForType() {
+ return com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec
+ .getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec
+ build() {
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec result =
+ buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec
+ buildPartial() {
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec result =
+ new com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec(
+ this);
+ buildPartialRepeatedFields(result);
+ if (bitField0_ != 0) {
+ buildPartial0(result);
+ }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartialRepeatedFields(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec result) {
+ if (indexSpecsBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0)) {
+ indexSpecs_ = java.util.Collections.unmodifiableList(indexSpecs_);
+ bitField0_ = (bitField0_ & ~0x00000001);
+ }
+ result.indexSpecs_ = indexSpecs_;
+ } else {
+ result.indexSpecs_ = indexSpecsBuilder_.build();
+ }
+ }
+
+ private void buildPartial0(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec result) {
+ int from_bitField0_ = bitField0_;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other
+ instanceof
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec) {
+ return mergeFrom(
+ (com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec)
+ other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec other) {
+ if (other
+ == com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec
+ .getDefaultInstance()) return this;
+ if (indexSpecsBuilder_ == null) {
+ if (!other.indexSpecs_.isEmpty()) {
+ if (indexSpecs_.isEmpty()) {
+ indexSpecs_ = other.indexSpecs_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ } else {
+ ensureIndexSpecsIsMutable();
+ indexSpecs_.addAll(other.indexSpecs_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.indexSpecs_.isEmpty()) {
+ if (indexSpecsBuilder_.isEmpty()) {
+ indexSpecsBuilder_.dispose();
+ indexSpecsBuilder_ = null;
+ indexSpecs_ = other.indexSpecs_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ indexSpecsBuilder_ =
+ com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders
+ ? internalGetIndexSpecsFieldBuilder()
+ : null;
+ } else {
+ indexSpecsBuilder_.addAllMessages(other.indexSpecs_);
+ }
+ }
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ 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.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchTextIndexSpec
+ m =
+ input.readMessage(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchTextIndexSpec.parser(),
+ extensionRegistry);
+ if (indexSpecsBuilder_ == null) {
+ ensureIndexSpecsIsMutable();
+ indexSpecs_.add(m);
+ } else {
+ indexSpecsBuilder_.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<
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec>
+ indexSpecs_ = java.util.Collections.emptyList();
+
+ private void ensureIndexSpecsIsMutable() {
+ if (!((bitField0_ & 0x00000001) != 0)) {
+ indexSpecs_ =
+ new java.util.ArrayList<
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchTextIndexSpec>(indexSpecs_);
+ bitField0_ |= 0x00000001;
+ }
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilder<
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec
+ .Builder,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchTextIndexSpecOrBuilder>
+ indexSpecsBuilder_;
+
+ /**
+ *
+ *
+ *
+ * Required. Specifications for how the field should be indexed.
+ * Repeated so that the field can be indexed in multiple ways.
+ *
+ *
+ *
+ * repeated .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec index_specs = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public java.util.List<
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec>
+ getIndexSpecsList() {
+ if (indexSpecsBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(indexSpecs_);
+ } else {
+ return indexSpecsBuilder_.getMessageList();
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. Specifications for how the field should be indexed.
+ * Repeated so that the field can be indexed in multiple ways.
+ *
+ *
+ *
+ * repeated .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec index_specs = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public int getIndexSpecsCount() {
+ if (indexSpecsBuilder_ == null) {
+ return indexSpecs_.size();
+ } else {
+ return indexSpecsBuilder_.getCount();
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. Specifications for how the field should be indexed.
+ * Repeated so that the field can be indexed in multiple ways.
+ *
+ *
+ *
+ * repeated .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec index_specs = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec
+ getIndexSpecs(int index) {
+ if (indexSpecsBuilder_ == null) {
+ return indexSpecs_.get(index);
+ } else {
+ return indexSpecsBuilder_.getMessage(index);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. Specifications for how the field should be indexed.
+ * Repeated so that the field can be indexed in multiple ways.
+ *
+ *
+ *
+ * repeated .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec index_specs = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder setIndexSpecs(
+ int index,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec
+ value) {
+ if (indexSpecsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureIndexSpecsIsMutable();
+ indexSpecs_.set(index, value);
+ onChanged();
+ } else {
+ indexSpecsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. Specifications for how the field should be indexed.
+ * Repeated so that the field can be indexed in multiple ways.
+ *
+ *
+ *
+ * repeated .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec index_specs = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder setIndexSpecs(
+ int index,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec
+ .Builder
+ builderForValue) {
+ if (indexSpecsBuilder_ == null) {
+ ensureIndexSpecsIsMutable();
+ indexSpecs_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ indexSpecsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. Specifications for how the field should be indexed.
+ * Repeated so that the field can be indexed in multiple ways.
+ *
+ *
+ *
+ * repeated .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec index_specs = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder addIndexSpecs(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec
+ value) {
+ if (indexSpecsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureIndexSpecsIsMutable();
+ indexSpecs_.add(value);
+ onChanged();
+ } else {
+ indexSpecsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. Specifications for how the field should be indexed.
+ * Repeated so that the field can be indexed in multiple ways.
+ *
+ *
+ *
+ * repeated .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec index_specs = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder addIndexSpecs(
+ int index,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec
+ value) {
+ if (indexSpecsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureIndexSpecsIsMutable();
+ indexSpecs_.add(index, value);
+ onChanged();
+ } else {
+ indexSpecsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. Specifications for how the field should be indexed.
+ * Repeated so that the field can be indexed in multiple ways.
+ *
+ *
+ *
+ * repeated .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec index_specs = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder addIndexSpecs(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec
+ .Builder
+ builderForValue) {
+ if (indexSpecsBuilder_ == null) {
+ ensureIndexSpecsIsMutable();
+ indexSpecs_.add(builderForValue.build());
+ onChanged();
+ } else {
+ indexSpecsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. Specifications for how the field should be indexed.
+ * Repeated so that the field can be indexed in multiple ways.
+ *
+ *
+ *
+ * repeated .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec index_specs = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder addIndexSpecs(
+ int index,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec
+ .Builder
+ builderForValue) {
+ if (indexSpecsBuilder_ == null) {
+ ensureIndexSpecsIsMutable();
+ indexSpecs_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ indexSpecsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. Specifications for how the field should be indexed.
+ * Repeated so that the field can be indexed in multiple ways.
+ *
+ *
+ *
+ * repeated .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec index_specs = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder addAllIndexSpecs(
+ java.lang.Iterable<
+ ? extends
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchTextIndexSpec>
+ values) {
+ if (indexSpecsBuilder_ == null) {
+ ensureIndexSpecsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, indexSpecs_);
+ onChanged();
+ } else {
+ indexSpecsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. Specifications for how the field should be indexed.
+ * Repeated so that the field can be indexed in multiple ways.
+ *
+ *
+ *
+ * repeated .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec index_specs = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder clearIndexSpecs() {
+ if (indexSpecsBuilder_ == null) {
+ indexSpecs_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ indexSpecsBuilder_.clear();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. Specifications for how the field should be indexed.
+ * Repeated so that the field can be indexed in multiple ways.
+ *
+ *
+ *
+ * repeated .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec index_specs = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder removeIndexSpecs(int index) {
+ if (indexSpecsBuilder_ == null) {
+ ensureIndexSpecsIsMutable();
+ indexSpecs_.remove(index);
+ onChanged();
+ } else {
+ indexSpecsBuilder_.remove(index);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. Specifications for how the field should be indexed.
+ * Repeated so that the field can be indexed in multiple ways.
+ *
+ *
+ *
+ * repeated .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec index_specs = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec
+ .Builder
+ getIndexSpecsBuilder(int index) {
+ return internalGetIndexSpecsFieldBuilder().getBuilder(index);
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. Specifications for how the field should be indexed.
+ * Repeated so that the field can be indexed in multiple ways.
+ *
+ *
+ *
+ * repeated .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec index_specs = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchTextIndexSpecOrBuilder
+ getIndexSpecsOrBuilder(int index) {
+ if (indexSpecsBuilder_ == null) {
+ return indexSpecs_.get(index);
+ } else {
+ return indexSpecsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. Specifications for how the field should be indexed.
+ * Repeated so that the field can be indexed in multiple ways.
+ *
+ *
+ *
+ * repeated .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec index_specs = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public java.util.List<
+ ? extends
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchTextIndexSpecOrBuilder>
+ getIndexSpecsOrBuilderList() {
+ if (indexSpecsBuilder_ != null) {
+ return indexSpecsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(indexSpecs_);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. Specifications for how the field should be indexed.
+ * Repeated so that the field can be indexed in multiple ways.
+ *
+ *
+ *
+ * repeated .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec index_specs = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec
+ .Builder
+ addIndexSpecsBuilder() {
+ return internalGetIndexSpecsFieldBuilder()
+ .addBuilder(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec
+ .getDefaultInstance());
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. Specifications for how the field should be indexed.
+ * Repeated so that the field can be indexed in multiple ways.
+ *
+ *
+ *
+ * repeated .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec index_specs = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec
+ .Builder
+ addIndexSpecsBuilder(int index) {
+ return internalGetIndexSpecsFieldBuilder()
+ .addBuilder(
+ index,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec
+ .getDefaultInstance());
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. Specifications for how the field should be indexed.
+ * Repeated so that the field can be indexed in multiple ways.
+ *
+ *
+ *
+ * repeated .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec index_specs = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public java.util.List<
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec
+ .Builder>
+ getIndexSpecsBuilderList() {
+ return internalGetIndexSpecsFieldBuilder().getBuilderList();
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilder<
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec
+ .Builder,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchTextIndexSpecOrBuilder>
+ internalGetIndexSpecsFieldBuilder() {
+ if (indexSpecsBuilder_ == null) {
+ indexSpecsBuilder_ =
+ new com.google.protobuf.RepeatedFieldBuilder<
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchTextIndexSpec,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchTextIndexSpec.Builder,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchTextIndexSpecOrBuilder>(
+ indexSpecs_,
+ ((bitField0_ & 0x00000001) != 0),
+ getParentForChildren(),
+ isClean());
+ indexSpecs_ = null;
+ }
+ return indexSpecsBuilder_;
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec)
+ private static final com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchTextSpec
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE =
+ new com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec();
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public SearchTextSpec parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException()
+ .setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec
+ getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+ }
+
+ public interface SearchGeoSpecOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ *
+ * Optional. Disables geoJSON indexing for the field. By default,
+ * geoJSON points are indexed.
+ *
+ *
+ * bool geo_json_indexing_disabled = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The geoJsonIndexingDisabled.
+ */
+ boolean getGeoJsonIndexingDisabled();
+ }
+
+ /**
+ *
+ *
+ *
+ * The specification for how to build a geo search index for a field.
+ *
+ *
+ * Protobuf type {@code google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec}
+ */
+ public static final class SearchGeoSpec extends com.google.protobuf.GeneratedMessage
+ implements
+ // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec)
+ SearchGeoSpecOrBuilder {
+ private static final long serialVersionUID = 0L;
+
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 33,
+ /* patch= */ 2,
+ /* suffix= */ "",
+ "SearchGeoSpec");
+ }
+
+ // Use SearchGeoSpec.newBuilder() to construct.
+ private SearchGeoSpec(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ }
+
+ private SearchGeoSpec() {}
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.firestore.admin.v1.IndexProto
+ .internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_SearchGeoSpec_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.firestore.admin.v1.IndexProto
+ .internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_SearchGeoSpec_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec.class,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec.Builder
+ .class);
+ }
+
+ public static final int GEO_JSON_INDEXING_DISABLED_FIELD_NUMBER = 1;
+ private boolean geoJsonIndexingDisabled_ = false;
+
+ /**
+ *
+ *
+ *
+ * Optional. Disables geoJSON indexing for the field. By default,
+ * geoJSON points are indexed.
+ *
+ *
+ * bool geo_json_indexing_disabled = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The geoJsonIndexingDisabled.
+ */
+ @java.lang.Override
+ public boolean getGeoJsonIndexingDisabled() {
+ return geoJsonIndexingDisabled_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (geoJsonIndexingDisabled_ != false) {
+ output.writeBool(1, geoJsonIndexingDisabled_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (geoJsonIndexingDisabled_ != false) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeBoolSize(1, geoJsonIndexingDisabled_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj
+ instanceof
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec)) {
+ return super.equals(obj);
+ }
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec other =
+ (com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec) obj;
+
+ if (getGeoJsonIndexingDisabled() != other.getGeoJsonIndexingDisabled()) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + GEO_JSON_INDEXING_DISABLED_FIELD_NUMBER;
+ hash =
+ (53 * hash) + com.google.protobuf.Internal.hashBoolean(getGeoJsonIndexingDisabled());
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec
+ parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec
+ parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec
+ parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec
+ parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec
+ parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec
+ parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec
+ parseFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec
+ parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec
+ parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec
+ parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec
+ parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new 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 specification for how to build a geo search index for a field.
+ *
+ *
+ * Protobuf type {@code
+ * google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec}
+ */
+ public static final class Builder
+ extends com.google.protobuf.GeneratedMessage.Builder
+ implements
+ // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec)
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpecOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.firestore.admin.v1.IndexProto
+ .internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_SearchGeoSpec_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.firestore.admin.v1.IndexProto
+ .internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_SearchGeoSpec_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec.class,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec
+ .Builder.class);
+ }
+
+ // Construct using
+ // com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec.newBuilder()
+ private Builder() {}
+
+ private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+ }
+
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ geoJsonIndexingDisabled_ = false;
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.firestore.admin.v1.IndexProto
+ .internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_SearchGeoSpec_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec
+ getDefaultInstanceForType() {
+ return com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec
+ .getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec build() {
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec result =
+ buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec
+ buildPartial() {
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec result =
+ new com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec(this);
+ if (bitField0_ != 0) {
+ buildPartial0(result);
+ }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.geoJsonIndexingDisabled_ = geoJsonIndexingDisabled_;
+ }
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other
+ instanceof
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec) {
+ return mergeFrom(
+ (com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec)
+ other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec other) {
+ if (other
+ == com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec
+ .getDefaultInstance()) return this;
+ if (other.getGeoJsonIndexingDisabled() != false) {
+ setGeoJsonIndexingDisabled(other.getGeoJsonIndexingDisabled());
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 8:
+ {
+ geoJsonIndexingDisabled_ = 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 geoJsonIndexingDisabled_;
+
+ /**
+ *
+ *
+ *
+ * Optional. Disables geoJSON indexing for the field. By default,
+ * geoJSON points are indexed.
+ *
+ *
+ * bool geo_json_indexing_disabled = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The geoJsonIndexingDisabled.
+ */
+ @java.lang.Override
+ public boolean getGeoJsonIndexingDisabled() {
+ return geoJsonIndexingDisabled_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. Disables geoJSON indexing for the field. By default,
+ * geoJSON points are indexed.
+ *
+ *
+ * bool geo_json_indexing_disabled = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @param value The geoJsonIndexingDisabled to set.
+ * @return This builder for chaining.
+ */
+ public Builder setGeoJsonIndexingDisabled(boolean value) {
+
+ geoJsonIndexingDisabled_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. Disables geoJSON indexing for the field. By default,
+ * geoJSON points are indexed.
+ *
+ *
+ * bool geo_json_indexing_disabled = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearGeoJsonIndexingDisabled() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ geoJsonIndexingDisabled_ = false;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec)
+ private static final com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchGeoSpec
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE =
+ new com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec();
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public SearchGeoSpec parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException()
+ .setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec
+ getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+ }
+
+ private int bitField0_;
+ public static final int TEXT_SPEC_FIELD_NUMBER = 1;
+ private com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec textSpec_;
+
+ /**
+ *
+ *
+ *
+ * Optional. The specification for building a text search index for a
+ * field.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec text_spec = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the textSpec field is set.
+ */
+ @java.lang.Override
+ public boolean hasTextSpec() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The specification for building a text search index for a
+ * field.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec text_spec = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The textSpec.
+ */
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec
+ getTextSpec() {
+ return textSpec_ == null
+ ? com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec
+ .getDefaultInstance()
+ : textSpec_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The specification for building a text search index for a
+ * field.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec text_spec = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpecOrBuilder
+ getTextSpecOrBuilder() {
+ return textSpec_ == null
+ ? com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec
+ .getDefaultInstance()
+ : textSpec_;
+ }
+
+ public static final int GEO_SPEC_FIELD_NUMBER = 2;
+ private com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec geoSpec_;
+
+ /**
+ *
+ *
+ *
+ * Optional. The specification for building a geo search index for a
+ * field.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec geo_spec = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the geoSpec field is set.
+ */
+ @java.lang.Override
+ public boolean hasGeoSpec() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The specification for building a geo search index for a
+ * field.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec geo_spec = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The geoSpec.
+ */
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec
+ getGeoSpec() {
+ return geoSpec_ == null
+ ? com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec
+ .getDefaultInstance()
+ : geoSpec_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The specification for building a geo search index for a
+ * field.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec geo_spec = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpecOrBuilder
+ getGeoSpecOrBuilder() {
+ return geoSpec_ == null
+ ? com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec
+ .getDefaultInstance()
+ : geoSpec_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (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, getTextSpec());
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ output.writeMessage(2, getGeoSpec());
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @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, getTextSpec());
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getGeoSpec());
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.firestore.admin.v1.Index.IndexField.SearchConfig)) {
+ return super.equals(obj);
+ }
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig other =
+ (com.google.firestore.admin.v1.Index.IndexField.SearchConfig) obj;
+
+ if (hasTextSpec() != other.hasTextSpec()) return false;
+ if (hasTextSpec()) {
+ if (!getTextSpec().equals(other.getTextSpec())) return false;
+ }
+ if (hasGeoSpec() != other.hasGeoSpec()) return false;
+ if (hasGeoSpec()) {
+ if (!getGeoSpec().equals(other.getGeoSpec())) return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasTextSpec()) {
+ hash = (37 * hash) + TEXT_SPEC_FIELD_NUMBER;
+ hash = (53 * hash) + getTextSpec().hashCode();
+ }
+ if (hasGeoSpec()) {
+ hash = (37 * hash) + GEO_SPEC_FIELD_NUMBER;
+ hash = (53 * hash) + getGeoSpec().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new 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 configuration for how to index a field for search.
+ *
+ *
+ * Protobuf type {@code google.firestore.admin.v1.Index.IndexField.SearchConfig}
+ */
+ public static final class Builder
+ extends com.google.protobuf.GeneratedMessage.Builder
+ implements
+ // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.Index.IndexField.SearchConfig)
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfigOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.firestore.admin.v1.IndexProto
+ .internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.firestore.admin.v1.IndexProto
+ .internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.class,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.Builder.class);
+ }
+
+ // Construct using com.google.firestore.admin.v1.Index.IndexField.SearchConfig.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+ internalGetTextSpecFieldBuilder();
+ internalGetGeoSpecFieldBuilder();
+ }
+ }
+
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ textSpec_ = null;
+ if (textSpecBuilder_ != null) {
+ textSpecBuilder_.dispose();
+ textSpecBuilder_ = null;
+ }
+ geoSpec_ = null;
+ if (geoSpecBuilder_ != null) {
+ geoSpecBuilder_.dispose();
+ geoSpecBuilder_ = null;
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.firestore.admin.v1.IndexProto
+ .internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ getDefaultInstanceForType() {
+ return com.google.firestore.admin.v1.Index.IndexField.SearchConfig.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig build() {
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig buildPartial() {
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig result =
+ new com.google.firestore.admin.v1.Index.IndexField.SearchConfig(this);
+ if (bitField0_ != 0) {
+ buildPartial0(result);
+ }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig result) {
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.textSpec_ = textSpecBuilder_ == null ? textSpec_ : textSpecBuilder_.build();
+ to_bitField0_ |= 0x00000001;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.geoSpec_ = geoSpecBuilder_ == null ? geoSpec_ : geoSpecBuilder_.build();
+ to_bitField0_ |= 0x00000002;
+ }
+ result.bitField0_ |= to_bitField0_;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.firestore.admin.v1.Index.IndexField.SearchConfig) {
+ return mergeFrom((com.google.firestore.admin.v1.Index.IndexField.SearchConfig) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig other) {
+ if (other
+ == com.google.firestore.admin.v1.Index.IndexField.SearchConfig.getDefaultInstance())
+ return this;
+ if (other.hasTextSpec()) {
+ mergeTextSpec(other.getTextSpec());
+ }
+ if (other.hasGeoSpec()) {
+ mergeGeoSpec(other.getGeoSpec());
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ 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(
+ internalGetTextSpecFieldBuilder().getBuilder(), extensionRegistry);
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18:
+ {
+ input.readMessage(
+ internalGetGeoSpecFieldBuilder().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 com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec
+ textSpec_;
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec.Builder,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpecOrBuilder>
+ textSpecBuilder_;
+
+ /**
+ *
+ *
+ *
+ * Optional. The specification for building a text search index for a
+ * field.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec text_spec = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the textSpec field is set.
+ */
+ public boolean hasTextSpec() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The specification for building a text search index for a
+ * field.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec text_spec = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The textSpec.
+ */
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec
+ getTextSpec() {
+ if (textSpecBuilder_ == null) {
+ return textSpec_ == null
+ ? com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec
+ .getDefaultInstance()
+ : textSpec_;
+ } else {
+ return textSpecBuilder_.getMessage();
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The specification for building a text search index for a
+ * field.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec text_spec = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setTextSpec(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec value) {
+ if (textSpecBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ textSpec_ = value;
+ } else {
+ textSpecBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The specification for building a text search index for a
+ * field.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec text_spec = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setTextSpec(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec.Builder
+ builderForValue) {
+ if (textSpecBuilder_ == null) {
+ textSpec_ = builderForValue.build();
+ } else {
+ textSpecBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The specification for building a text search index for a
+ * field.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec text_spec = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder mergeTextSpec(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec value) {
+ if (textSpecBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0)
+ && textSpec_ != null
+ && textSpec_
+ != com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec
+ .getDefaultInstance()) {
+ getTextSpecBuilder().mergeFrom(value);
+ } else {
+ textSpec_ = value;
+ }
+ } else {
+ textSpecBuilder_.mergeFrom(value);
+ }
+ if (textSpec_ != null) {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The specification for building a text search index for a
+ * field.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec text_spec = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder clearTextSpec() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ textSpec_ = null;
+ if (textSpecBuilder_ != null) {
+ textSpecBuilder_.dispose();
+ textSpecBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The specification for building a text search index for a
+ * field.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec text_spec = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec.Builder
+ getTextSpecBuilder() {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return internalGetTextSpecFieldBuilder().getBuilder();
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The specification for building a text search index for a
+ * field.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec text_spec = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpecOrBuilder
+ getTextSpecOrBuilder() {
+ if (textSpecBuilder_ != null) {
+ return textSpecBuilder_.getMessageOrBuilder();
+ } else {
+ return textSpec_ == null
+ ? com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec
+ .getDefaultInstance()
+ : textSpec_;
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The specification for building a text search index for a
+ * field.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec text_spec = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec.Builder,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpecOrBuilder>
+ internalGetTextSpecFieldBuilder() {
+ if (textSpecBuilder_ == null) {
+ textSpecBuilder_ =
+ new com.google.protobuf.SingleFieldBuilder<
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec
+ .Builder,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchTextSpecOrBuilder>(getTextSpec(), getParentForChildren(), isClean());
+ textSpec_ = null;
+ }
+ return textSpecBuilder_;
+ }
+
+ private com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec geoSpec_;
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec.Builder,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpecOrBuilder>
+ geoSpecBuilder_;
+
+ /**
+ *
+ *
+ *
+ * Optional. The specification for building a geo search index for a
+ * field.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec geo_spec = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the geoSpec field is set.
+ */
+ public boolean hasGeoSpec() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The specification for building a geo search index for a
+ * field.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec geo_spec = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The geoSpec.
+ */
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec
+ getGeoSpec() {
+ if (geoSpecBuilder_ == null) {
+ return geoSpec_ == null
+ ? com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec
+ .getDefaultInstance()
+ : geoSpec_;
+ } else {
+ return geoSpecBuilder_.getMessage();
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The specification for building a geo search index for a
+ * field.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec geo_spec = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setGeoSpec(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec value) {
+ if (geoSpecBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ geoSpec_ = value;
+ } else {
+ geoSpecBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The specification for building a geo search index for a
+ * field.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec geo_spec = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setGeoSpec(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec.Builder
+ builderForValue) {
+ if (geoSpecBuilder_ == null) {
+ geoSpec_ = builderForValue.build();
+ } else {
+ geoSpecBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The specification for building a geo search index for a
+ * field.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec geo_spec = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder mergeGeoSpec(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec value) {
+ if (geoSpecBuilder_ == null) {
+ if (((bitField0_ & 0x00000002) != 0)
+ && geoSpec_ != null
+ && geoSpec_
+ != com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec
+ .getDefaultInstance()) {
+ getGeoSpecBuilder().mergeFrom(value);
+ } else {
+ geoSpec_ = value;
+ }
+ } else {
+ geoSpecBuilder_.mergeFrom(value);
+ }
+ if (geoSpec_ != null) {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The specification for building a geo search index for a
+ * field.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec geo_spec = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder clearGeoSpec() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ geoSpec_ = null;
+ if (geoSpecBuilder_ != null) {
+ geoSpecBuilder_.dispose();
+ geoSpecBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The specification for building a geo search index for a
+ * field.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec geo_spec = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec.Builder
+ getGeoSpecBuilder() {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return internalGetGeoSpecFieldBuilder().getBuilder();
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The specification for building a geo search index for a
+ * field.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec geo_spec = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpecOrBuilder
+ getGeoSpecOrBuilder() {
+ if (geoSpecBuilder_ != null) {
+ return geoSpecBuilder_.getMessageOrBuilder();
+ } else {
+ return geoSpec_ == null
+ ? com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec
+ .getDefaultInstance()
+ : geoSpec_;
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The specification for building a geo search index for a
+ * field.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec geo_spec = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec.Builder,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpecOrBuilder>
+ internalGetGeoSpecFieldBuilder() {
+ if (geoSpecBuilder_ == null) {
+ geoSpecBuilder_ =
+ new com.google.protobuf.SingleFieldBuilder<
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec
+ .Builder,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .SearchGeoSpecOrBuilder>(getGeoSpec(), getParentForChildren(), isClean());
+ geoSpec_ = null;
+ }
+ return geoSpecBuilder_;
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.firestore.admin.v1.Index.IndexField.SearchConfig)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.Index.IndexField.SearchConfig)
+ private static final com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.firestore.admin.v1.Index.IndexField.SearchConfig();
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public SearchConfig parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException()
+ .setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+ }
+
+ private int valueModeCase_ = 0;
+
+ @SuppressWarnings("serial")
+ private java.lang.Object valueMode_;
+
+ public enum ValueModeCase
+ implements
+ com.google.protobuf.Internal.EnumLite,
+ com.google.protobuf.AbstractMessage.InternalOneOfEnum {
+ ORDER(2),
+ ARRAY_CONFIG(3),
+ VECTOR_CONFIG(4),
+ SEARCH_CONFIG(5),
+ VALUEMODE_NOT_SET(0);
+ private final int value;
+
+ private ValueModeCase(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 ValueModeCase valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static ValueModeCase forNumber(int value) {
+ switch (value) {
+ case 2:
+ return ORDER;
+ case 3:
+ return ARRAY_CONFIG;
+ case 4:
+ return VECTOR_CONFIG;
+ case 5:
+ return SEARCH_CONFIG;
+ case 0:
+ return VALUEMODE_NOT_SET;
+ default:
+ return null;
+ }
+ }
+
+ public int getNumber() {
+ return this.value;
+ }
+ };
+
+ public ValueModeCase getValueModeCase() {
+ return ValueModeCase.forNumber(valueModeCase_);
+ }
+
+ public static final int FIELD_PATH_FIELD_NUMBER = 1;
+
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object fieldPath_ = "";
+
+ /**
+ *
+ *
+ *
+ * Can be __name__.
+ * For single field indexes, this must match the name of the field or may
+ * be omitted.
+ *
+ *
+ * string field_path = 1;
+ *
+ * @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();
+ fieldPath_ = s;
+ return s;
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Can be __name__.
+ * For single field indexes, this must match the name of the field or may
+ * be omitted.
+ *
+ *
+ * string field_path = 1;
+ *
+ * @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 ORDER_FIELD_NUMBER = 2;
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports ordering by the specified order or
+ * comparing using =, !=, <, <=, >, >=.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.Order order = 2;
+ *
+ * @return Whether the order field is set.
+ */
+ public boolean hasOrder() {
+ return valueModeCase_ == 2;
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports ordering by the specified order or
+ * comparing using =, !=, <, <=, >, >=.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.Order order = 2;
+ *
+ * @return The enum numeric value on the wire for order.
+ */
+ public int getOrderValue() {
+ if (valueModeCase_ == 2) {
+ return (java.lang.Integer) valueMode_;
+ }
+ return 0;
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports ordering by the specified order or
+ * comparing using =, !=, <, <=, >, >=.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.Order order = 2;
+ *
+ * @return The order.
+ */
+ public com.google.firestore.admin.v1.Index.IndexField.Order getOrder() {
+ if (valueModeCase_ == 2) {
+ com.google.firestore.admin.v1.Index.IndexField.Order result =
+ com.google.firestore.admin.v1.Index.IndexField.Order.forNumber(
+ (java.lang.Integer) valueMode_);
+ return result == null
+ ? com.google.firestore.admin.v1.Index.IndexField.Order.UNRECOGNIZED
+ : result;
+ }
+ return com.google.firestore.admin.v1.Index.IndexField.Order.ORDER_UNSPECIFIED;
+ }
+
+ public static final int ARRAY_CONFIG_FIELD_NUMBER = 3;
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports operations on `array_value`s.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3;
+ *
+ * @return Whether the arrayConfig field is set.
+ */
+ public boolean hasArrayConfig() {
+ return valueModeCase_ == 3;
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports operations on `array_value`s.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3;
+ *
+ * @return The enum numeric value on the wire for arrayConfig.
+ */
+ public int getArrayConfigValue() {
+ if (valueModeCase_ == 3) {
+ return (java.lang.Integer) valueMode_;
+ }
+ return 0;
+ }
+
+ /**
+ *
+ *
+ *
* Indicates that this field supports operations on `array_value`s.
*
*
- * .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3;
+ * .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3;
+ *
+ * @return The arrayConfig.
+ */
+ public com.google.firestore.admin.v1.Index.IndexField.ArrayConfig getArrayConfig() {
+ if (valueModeCase_ == 3) {
+ com.google.firestore.admin.v1.Index.IndexField.ArrayConfig result =
+ com.google.firestore.admin.v1.Index.IndexField.ArrayConfig.forNumber(
+ (java.lang.Integer) valueMode_);
+ return result == null
+ ? com.google.firestore.admin.v1.Index.IndexField.ArrayConfig.UNRECOGNIZED
+ : result;
+ }
+ return com.google.firestore.admin.v1.Index.IndexField.ArrayConfig.ARRAY_CONFIG_UNSPECIFIED;
+ }
+
+ public static final int VECTOR_CONFIG_FIELD_NUMBER = 4;
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports nearest neighbor and distance
+ * operations on vector.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4;
+ *
+ * @return Whether the vectorConfig field is set.
+ */
+ @java.lang.Override
+ public boolean hasVectorConfig() {
+ return valueModeCase_ == 4;
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports nearest neighbor and distance
+ * operations on vector.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4;
+ *
+ * @return The vectorConfig.
+ */
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.VectorConfig getVectorConfig() {
+ if (valueModeCase_ == 4) {
+ return (com.google.firestore.admin.v1.Index.IndexField.VectorConfig) valueMode_;
+ }
+ return com.google.firestore.admin.v1.Index.IndexField.VectorConfig.getDefaultInstance();
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports nearest neighbor and distance
+ * operations on vector.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4;
+ */
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.VectorConfigOrBuilder
+ getVectorConfigOrBuilder() {
+ if (valueModeCase_ == 4) {
+ return (com.google.firestore.admin.v1.Index.IndexField.VectorConfig) valueMode_;
+ }
+ return com.google.firestore.admin.v1.Index.IndexField.VectorConfig.getDefaultInstance();
+ }
+
+ public static final int SEARCH_CONFIG_FIELD_NUMBER = 5;
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports search operations. This field
+ * is only currently supported for indexes with MONGODB_COMPATIBLE_API
+ * ApiScope.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig search_config = 5;
+ *
+ * @return Whether the searchConfig field is set.
+ */
+ @java.lang.Override
+ public boolean hasSearchConfig() {
+ return valueModeCase_ == 5;
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports search operations. This field
+ * is only currently supported for indexes with MONGODB_COMPATIBLE_API
+ * ApiScope.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig search_config = 5;
+ *
+ * @return The searchConfig.
+ */
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig getSearchConfig() {
+ if (valueModeCase_ == 5) {
+ return (com.google.firestore.admin.v1.Index.IndexField.SearchConfig) valueMode_;
+ }
+ return com.google.firestore.admin.v1.Index.IndexField.SearchConfig.getDefaultInstance();
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports search operations. This field
+ * is only currently supported for indexes with MONGODB_COMPATIBLE_API
+ * ApiScope.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig search_config = 5;
+ */
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfigOrBuilder
+ getSearchConfigOrBuilder() {
+ if (valueModeCase_ == 5) {
+ return (com.google.firestore.admin.v1.Index.IndexField.SearchConfig) valueMode_;
+ }
+ return com.google.firestore.admin.v1.Index.IndexField.SearchConfig.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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(fieldPath_)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 1, fieldPath_);
+ }
+ if (valueModeCase_ == 2) {
+ output.writeEnum(2, ((java.lang.Integer) valueMode_));
+ }
+ if (valueModeCase_ == 3) {
+ output.writeEnum(3, ((java.lang.Integer) valueMode_));
+ }
+ if (valueModeCase_ == 4) {
+ output.writeMessage(
+ 4, (com.google.firestore.admin.v1.Index.IndexField.VectorConfig) valueMode_);
+ }
+ if (valueModeCase_ == 5) {
+ output.writeMessage(
+ 5, (com.google.firestore.admin.v1.Index.IndexField.SearchConfig) valueMode_);
+ }
+ 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(fieldPath_)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(1, fieldPath_);
+ }
+ if (valueModeCase_ == 2) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeEnumSize(
+ 2, ((java.lang.Integer) valueMode_));
+ }
+ if (valueModeCase_ == 3) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeEnumSize(
+ 3, ((java.lang.Integer) valueMode_));
+ }
+ if (valueModeCase_ == 4) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 4, (com.google.firestore.admin.v1.Index.IndexField.VectorConfig) valueMode_);
+ }
+ if (valueModeCase_ == 5) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 5, (com.google.firestore.admin.v1.Index.IndexField.SearchConfig) valueMode_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.firestore.admin.v1.Index.IndexField)) {
+ return super.equals(obj);
+ }
+ com.google.firestore.admin.v1.Index.IndexField other =
+ (com.google.firestore.admin.v1.Index.IndexField) obj;
+
+ if (!getFieldPath().equals(other.getFieldPath())) return false;
+ if (!getValueModeCase().equals(other.getValueModeCase())) return false;
+ switch (valueModeCase_) {
+ case 2:
+ if (getOrderValue() != other.getOrderValue()) return false;
+ break;
+ case 3:
+ if (getArrayConfigValue() != other.getArrayConfigValue()) return false;
+ break;
+ case 4:
+ if (!getVectorConfig().equals(other.getVectorConfig())) return false;
+ break;
+ case 5:
+ if (!getSearchConfig().equals(other.getSearchConfig())) 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) + FIELD_PATH_FIELD_NUMBER;
+ hash = (53 * hash) + getFieldPath().hashCode();
+ switch (valueModeCase_) {
+ case 2:
+ hash = (37 * hash) + ORDER_FIELD_NUMBER;
+ hash = (53 * hash) + getOrderValue();
+ break;
+ case 3:
+ hash = (37 * hash) + ARRAY_CONFIG_FIELD_NUMBER;
+ hash = (53 * hash) + getArrayConfigValue();
+ break;
+ case 4:
+ hash = (37 * hash) + VECTOR_CONFIG_FIELD_NUMBER;
+ hash = (53 * hash) + getVectorConfig().hashCode();
+ break;
+ case 5:
+ hash = (37 * hash) + SEARCH_CONFIG_FIELD_NUMBER;
+ hash = (53 * hash) + getSearchConfig().hashCode();
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.firestore.admin.v1.Index.IndexField prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new 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 field in an index.
+ * The field_path describes which field is indexed, the value_mode describes
+ * how the field value is indexed.
+ *
+ *
+ * Protobuf type {@code google.firestore.admin.v1.Index.IndexField}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder
+ implements
+ // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.Index.IndexField)
+ com.google.firestore.admin.v1.Index.IndexFieldOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.firestore.admin.v1.IndexProto
+ .internal_static_google_firestore_admin_v1_Index_IndexField_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.firestore.admin.v1.IndexProto
+ .internal_static_google_firestore_admin_v1_Index_IndexField_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.firestore.admin.v1.Index.IndexField.class,
+ com.google.firestore.admin.v1.Index.IndexField.Builder.class);
+ }
+
+ // Construct using com.google.firestore.admin.v1.Index.IndexField.newBuilder()
+ private Builder() {}
+
+ private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+ }
+
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ fieldPath_ = "";
+ if (vectorConfigBuilder_ != null) {
+ vectorConfigBuilder_.clear();
+ }
+ if (searchConfigBuilder_ != null) {
+ searchConfigBuilder_.clear();
+ }
+ valueModeCase_ = 0;
+ valueMode_ = null;
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.firestore.admin.v1.IndexProto
+ .internal_static_google_firestore_admin_v1_Index_IndexField_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField getDefaultInstanceForType() {
+ return com.google.firestore.admin.v1.Index.IndexField.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField build() {
+ com.google.firestore.admin.v1.Index.IndexField result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField buildPartial() {
+ com.google.firestore.admin.v1.Index.IndexField result =
+ new com.google.firestore.admin.v1.Index.IndexField(this);
+ if (bitField0_ != 0) {
+ buildPartial0(result);
+ }
+ buildPartialOneofs(result);
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(com.google.firestore.admin.v1.Index.IndexField result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.fieldPath_ = fieldPath_;
+ }
+ }
+
+ private void buildPartialOneofs(com.google.firestore.admin.v1.Index.IndexField result) {
+ result.valueModeCase_ = valueModeCase_;
+ result.valueMode_ = this.valueMode_;
+ if (valueModeCase_ == 4 && vectorConfigBuilder_ != null) {
+ result.valueMode_ = vectorConfigBuilder_.build();
+ }
+ if (valueModeCase_ == 5 && searchConfigBuilder_ != null) {
+ result.valueMode_ = searchConfigBuilder_.build();
+ }
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.firestore.admin.v1.Index.IndexField) {
+ return mergeFrom((com.google.firestore.admin.v1.Index.IndexField) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.google.firestore.admin.v1.Index.IndexField other) {
+ if (other == com.google.firestore.admin.v1.Index.IndexField.getDefaultInstance())
+ return this;
+ if (!other.getFieldPath().isEmpty()) {
+ fieldPath_ = other.fieldPath_;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
+ switch (other.getValueModeCase()) {
+ case ORDER:
+ {
+ setOrderValue(other.getOrderValue());
+ break;
+ }
+ case ARRAY_CONFIG:
+ {
+ setArrayConfigValue(other.getArrayConfigValue());
+ break;
+ }
+ case VECTOR_CONFIG:
+ {
+ mergeVectorConfig(other.getVectorConfig());
+ break;
+ }
+ case SEARCH_CONFIG:
+ {
+ mergeSearchConfig(other.getSearchConfig());
+ break;
+ }
+ case VALUEMODE_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:
+ {
+ fieldPath_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 16:
+ {
+ int rawValue = input.readEnum();
+ valueModeCase_ = 2;
+ valueMode_ = rawValue;
+ break;
+ } // case 16
+ case 24:
+ {
+ int rawValue = input.readEnum();
+ valueModeCase_ = 3;
+ valueMode_ = rawValue;
+ break;
+ } // case 24
+ case 34:
+ {
+ input.readMessage(
+ internalGetVectorConfigFieldBuilder().getBuilder(), extensionRegistry);
+ valueModeCase_ = 4;
+ break;
+ } // case 34
+ case 42:
+ {
+ input.readMessage(
+ internalGetSearchConfigFieldBuilder().getBuilder(), extensionRegistry);
+ valueModeCase_ = 5;
+ 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 valueModeCase_ = 0;
+ private java.lang.Object valueMode_;
+
+ public ValueModeCase getValueModeCase() {
+ return ValueModeCase.forNumber(valueModeCase_);
+ }
+
+ public Builder clearValueMode() {
+ valueModeCase_ = 0;
+ valueMode_ = null;
+ onChanged();
+ return this;
+ }
+
+ private int bitField0_;
+
+ private java.lang.Object fieldPath_ = "";
+
+ /**
+ *
+ *
+ *
+ * Can be __name__.
+ * For single field indexes, this must match the name of the field or may
+ * be omitted.
+ *
+ *
+ * string field_path = 1;
+ *
+ * @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();
+ fieldPath_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Can be __name__.
+ * For single field indexes, this must match the name of the field or may
+ * be omitted.
+ *
+ *
+ * string field_path = 1;
+ *
+ * @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;
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Can be __name__.
+ * For single field indexes, this must match the name of the field or may
+ * be omitted.
+ *
+ *
+ * string field_path = 1;
+ *
+ * @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;
+ }
+
+ /**
+ *
+ *
+ *
+ * Can be __name__.
+ * For single field indexes, this must match the name of the field or may
+ * be omitted.
+ *
+ *
+ * string field_path = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearFieldPath() {
+ fieldPath_ = getDefaultInstance().getFieldPath();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Can be __name__.
+ * For single field indexes, this must match the name of the field or may
+ * be omitted.
+ *
+ *
+ * string field_path = 1;
+ *
+ * @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();
+ }
+ checkByteStringIsUtf8(value);
+ fieldPath_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports ordering by the specified order or
+ * comparing using =, !=, <, <=, >, >=.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.Order order = 2;
+ *
+ * @return Whether the order field is set.
+ */
+ @java.lang.Override
+ public boolean hasOrder() {
+ return valueModeCase_ == 2;
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports ordering by the specified order or
+ * comparing using =, !=, <, <=, >, >=.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.Order order = 2;
+ *
+ * @return The enum numeric value on the wire for order.
+ */
+ @java.lang.Override
+ public int getOrderValue() {
+ if (valueModeCase_ == 2) {
+ return ((java.lang.Integer) valueMode_).intValue();
+ }
+ return 0;
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports ordering by the specified order or
+ * comparing using =, !=, <, <=, >, >=.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.Order order = 2;
+ *
+ * @param value The enum numeric value on the wire for order to set.
+ * @return This builder for chaining.
+ */
+ public Builder setOrderValue(int value) {
+ valueModeCase_ = 2;
+ valueMode_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports ordering by the specified order or
+ * comparing using =, !=, <, <=, >, >=.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.Order order = 2;
+ *
+ * @return The order.
+ */
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.Order getOrder() {
+ if (valueModeCase_ == 2) {
+ com.google.firestore.admin.v1.Index.IndexField.Order result =
+ com.google.firestore.admin.v1.Index.IndexField.Order.forNumber(
+ (java.lang.Integer) valueMode_);
+ return result == null
+ ? com.google.firestore.admin.v1.Index.IndexField.Order.UNRECOGNIZED
+ : result;
+ }
+ return com.google.firestore.admin.v1.Index.IndexField.Order.ORDER_UNSPECIFIED;
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports ordering by the specified order or
+ * comparing using =, !=, <, <=, >, >=.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.Order order = 2;
+ *
+ * @param value The order to set.
+ * @return This builder for chaining.
+ */
+ public Builder setOrder(com.google.firestore.admin.v1.Index.IndexField.Order value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ valueModeCase_ = 2;
+ valueMode_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports ordering by the specified order or
+ * comparing using =, !=, <, <=, >, >=.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.Order order = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearOrder() {
+ if (valueModeCase_ == 2) {
+ valueModeCase_ = 0;
+ valueMode_ = null;
+ onChanged();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports operations on `array_value`s.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3;
+ *
+ * @return Whether the arrayConfig field is set.
+ */
+ @java.lang.Override
+ public boolean hasArrayConfig() {
+ return valueModeCase_ == 3;
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports operations on `array_value`s.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3;
+ *
+ * @return The enum numeric value on the wire for arrayConfig.
+ */
+ @java.lang.Override
+ public int getArrayConfigValue() {
+ if (valueModeCase_ == 3) {
+ return ((java.lang.Integer) valueMode_).intValue();
+ }
+ return 0;
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports operations on `array_value`s.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3;
+ *
+ * @param value The enum numeric value on the wire for arrayConfig to set.
+ * @return This builder for chaining.
+ */
+ public Builder setArrayConfigValue(int value) {
+ valueModeCase_ = 3;
+ valueMode_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports operations on `array_value`s.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3;
+ *
+ * @return The arrayConfig.
+ */
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.ArrayConfig getArrayConfig() {
+ if (valueModeCase_ == 3) {
+ com.google.firestore.admin.v1.Index.IndexField.ArrayConfig result =
+ com.google.firestore.admin.v1.Index.IndexField.ArrayConfig.forNumber(
+ (java.lang.Integer) valueMode_);
+ return result == null
+ ? com.google.firestore.admin.v1.Index.IndexField.ArrayConfig.UNRECOGNIZED
+ : result;
+ }
+ return com.google.firestore.admin.v1.Index.IndexField.ArrayConfig.ARRAY_CONFIG_UNSPECIFIED;
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports operations on `array_value`s.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3;
+ *
+ * @param value The arrayConfig to set.
+ * @return This builder for chaining.
+ */
+ public Builder setArrayConfig(
+ com.google.firestore.admin.v1.Index.IndexField.ArrayConfig value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ valueModeCase_ = 3;
+ valueMode_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports operations on `array_value`s.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearArrayConfig() {
+ if (valueModeCase_ == 3) {
+ valueModeCase_ = 0;
+ valueMode_ = null;
+ onChanged();
+ }
+ return this;
+ }
+
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.firestore.admin.v1.Index.IndexField.VectorConfig,
+ com.google.firestore.admin.v1.Index.IndexField.VectorConfig.Builder,
+ com.google.firestore.admin.v1.Index.IndexField.VectorConfigOrBuilder>
+ vectorConfigBuilder_;
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports nearest neighbor and distance
+ * operations on vector.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4;
+ *
+ * @return Whether the vectorConfig field is set.
+ */
+ @java.lang.Override
+ public boolean hasVectorConfig() {
+ return valueModeCase_ == 4;
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports nearest neighbor and distance
+ * operations on vector.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4;
+ *
+ * @return The vectorConfig.
+ */
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.VectorConfig getVectorConfig() {
+ if (vectorConfigBuilder_ == null) {
+ if (valueModeCase_ == 4) {
+ return (com.google.firestore.admin.v1.Index.IndexField.VectorConfig) valueMode_;
+ }
+ return com.google.firestore.admin.v1.Index.IndexField.VectorConfig.getDefaultInstance();
+ } else {
+ if (valueModeCase_ == 4) {
+ return vectorConfigBuilder_.getMessage();
+ }
+ return com.google.firestore.admin.v1.Index.IndexField.VectorConfig.getDefaultInstance();
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports nearest neighbor and distance
+ * operations on vector.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4;
+ */
+ public Builder setVectorConfig(
+ com.google.firestore.admin.v1.Index.IndexField.VectorConfig value) {
+ if (vectorConfigBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ valueMode_ = value;
+ onChanged();
+ } else {
+ vectorConfigBuilder_.setMessage(value);
+ }
+ valueModeCase_ = 4;
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports nearest neighbor and distance
+ * operations on vector.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4;
+ */
+ public Builder setVectorConfig(
+ com.google.firestore.admin.v1.Index.IndexField.VectorConfig.Builder builderForValue) {
+ if (vectorConfigBuilder_ == null) {
+ valueMode_ = builderForValue.build();
+ onChanged();
+ } else {
+ vectorConfigBuilder_.setMessage(builderForValue.build());
+ }
+ valueModeCase_ = 4;
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports nearest neighbor and distance
+ * operations on vector.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4;
+ */
+ public Builder mergeVectorConfig(
+ com.google.firestore.admin.v1.Index.IndexField.VectorConfig value) {
+ if (vectorConfigBuilder_ == null) {
+ if (valueModeCase_ == 4
+ && valueMode_
+ != com.google.firestore.admin.v1.Index.IndexField.VectorConfig
+ .getDefaultInstance()) {
+ valueMode_ =
+ com.google.firestore.admin.v1.Index.IndexField.VectorConfig.newBuilder(
+ (com.google.firestore.admin.v1.Index.IndexField.VectorConfig) valueMode_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ valueMode_ = value;
+ }
+ onChanged();
+ } else {
+ if (valueModeCase_ == 4) {
+ vectorConfigBuilder_.mergeFrom(value);
+ } else {
+ vectorConfigBuilder_.setMessage(value);
+ }
+ }
+ valueModeCase_ = 4;
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports nearest neighbor and distance
+ * operations on vector.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4;
+ */
+ public Builder clearVectorConfig() {
+ if (vectorConfigBuilder_ == null) {
+ if (valueModeCase_ == 4) {
+ valueModeCase_ = 0;
+ valueMode_ = null;
+ onChanged();
+ }
+ } else {
+ if (valueModeCase_ == 4) {
+ valueModeCase_ = 0;
+ valueMode_ = null;
+ }
+ vectorConfigBuilder_.clear();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports nearest neighbor and distance
+ * operations on vector.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4;
+ */
+ public com.google.firestore.admin.v1.Index.IndexField.VectorConfig.Builder
+ getVectorConfigBuilder() {
+ return internalGetVectorConfigFieldBuilder().getBuilder();
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports nearest neighbor and distance
+ * operations on vector.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4;
+ */
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.VectorConfigOrBuilder
+ getVectorConfigOrBuilder() {
+ if ((valueModeCase_ == 4) && (vectorConfigBuilder_ != null)) {
+ return vectorConfigBuilder_.getMessageOrBuilder();
+ } else {
+ if (valueModeCase_ == 4) {
+ return (com.google.firestore.admin.v1.Index.IndexField.VectorConfig) valueMode_;
+ }
+ return com.google.firestore.admin.v1.Index.IndexField.VectorConfig.getDefaultInstance();
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports nearest neighbor and distance
+ * operations on vector.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.firestore.admin.v1.Index.IndexField.VectorConfig,
+ com.google.firestore.admin.v1.Index.IndexField.VectorConfig.Builder,
+ com.google.firestore.admin.v1.Index.IndexField.VectorConfigOrBuilder>
+ internalGetVectorConfigFieldBuilder() {
+ if (vectorConfigBuilder_ == null) {
+ if (!(valueModeCase_ == 4)) {
+ valueMode_ =
+ com.google.firestore.admin.v1.Index.IndexField.VectorConfig.getDefaultInstance();
+ }
+ vectorConfigBuilder_ =
+ new com.google.protobuf.SingleFieldBuilder<
+ com.google.firestore.admin.v1.Index.IndexField.VectorConfig,
+ com.google.firestore.admin.v1.Index.IndexField.VectorConfig.Builder,
+ com.google.firestore.admin.v1.Index.IndexField.VectorConfigOrBuilder>(
+ (com.google.firestore.admin.v1.Index.IndexField.VectorConfig) valueMode_,
+ getParentForChildren(),
+ isClean());
+ valueMode_ = null;
+ }
+ valueModeCase_ = 4;
+ onChanged();
+ return vectorConfigBuilder_;
+ }
+
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.Builder,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfigOrBuilder>
+ searchConfigBuilder_;
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports search operations. This field
+ * is only currently supported for indexes with MONGODB_COMPATIBLE_API
+ * ApiScope.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig search_config = 5;
+ *
+ * @return Whether the searchConfig field is set.
+ */
+ @java.lang.Override
+ public boolean hasSearchConfig() {
+ return valueModeCase_ == 5;
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports search operations. This field
+ * is only currently supported for indexes with MONGODB_COMPATIBLE_API
+ * ApiScope.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig search_config = 5;
+ *
+ * @return The searchConfig.
+ */
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig getSearchConfig() {
+ if (searchConfigBuilder_ == null) {
+ if (valueModeCase_ == 5) {
+ return (com.google.firestore.admin.v1.Index.IndexField.SearchConfig) valueMode_;
+ }
+ return com.google.firestore.admin.v1.Index.IndexField.SearchConfig.getDefaultInstance();
+ } else {
+ if (valueModeCase_ == 5) {
+ return searchConfigBuilder_.getMessage();
+ }
+ return com.google.firestore.admin.v1.Index.IndexField.SearchConfig.getDefaultInstance();
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports search operations. This field
+ * is only currently supported for indexes with MONGODB_COMPATIBLE_API
+ * ApiScope.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig search_config = 5;
+ */
+ public Builder setSearchConfig(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig value) {
+ if (searchConfigBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ valueMode_ = value;
+ onChanged();
+ } else {
+ searchConfigBuilder_.setMessage(value);
+ }
+ valueModeCase_ = 5;
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports search operations. This field
+ * is only currently supported for indexes with MONGODB_COMPATIBLE_API
+ * ApiScope.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig search_config = 5;
+ */
+ public Builder setSearchConfig(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.Builder builderForValue) {
+ if (searchConfigBuilder_ == null) {
+ valueMode_ = builderForValue.build();
+ onChanged();
+ } else {
+ searchConfigBuilder_.setMessage(builderForValue.build());
+ }
+ valueModeCase_ = 5;
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports search operations. This field
+ * is only currently supported for indexes with MONGODB_COMPATIBLE_API
+ * ApiScope.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig search_config = 5;
+ */
+ public Builder mergeSearchConfig(
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig value) {
+ if (searchConfigBuilder_ == null) {
+ if (valueModeCase_ == 5
+ && valueMode_
+ != com.google.firestore.admin.v1.Index.IndexField.SearchConfig
+ .getDefaultInstance()) {
+ valueMode_ =
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.newBuilder(
+ (com.google.firestore.admin.v1.Index.IndexField.SearchConfig) valueMode_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ valueMode_ = value;
+ }
+ onChanged();
+ } else {
+ if (valueModeCase_ == 5) {
+ searchConfigBuilder_.mergeFrom(value);
+ } else {
+ searchConfigBuilder_.setMessage(value);
+ }
+ }
+ valueModeCase_ = 5;
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports search operations. This field
+ * is only currently supported for indexes with MONGODB_COMPATIBLE_API
+ * ApiScope.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig search_config = 5;
+ */
+ public Builder clearSearchConfig() {
+ if (searchConfigBuilder_ == null) {
+ if (valueModeCase_ == 5) {
+ valueModeCase_ = 0;
+ valueMode_ = null;
+ onChanged();
+ }
+ } else {
+ if (valueModeCase_ == 5) {
+ valueModeCase_ = 0;
+ valueMode_ = null;
+ }
+ searchConfigBuilder_.clear();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports search operations. This field
+ * is only currently supported for indexes with MONGODB_COMPATIBLE_API
+ * ApiScope.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig search_config = 5;
+ */
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfig.Builder
+ getSearchConfigBuilder() {
+ return internalGetSearchConfigFieldBuilder().getBuilder();
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports search operations. This field
+ * is only currently supported for indexes with MONGODB_COMPATIBLE_API
+ * ApiScope.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig search_config = 5;
+ */
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField.SearchConfigOrBuilder
+ getSearchConfigOrBuilder() {
+ if ((valueModeCase_ == 5) && (searchConfigBuilder_ != null)) {
+ return searchConfigBuilder_.getMessageOrBuilder();
+ } else {
+ if (valueModeCase_ == 5) {
+ return (com.google.firestore.admin.v1.Index.IndexField.SearchConfig) valueMode_;
+ }
+ return com.google.firestore.admin.v1.Index.IndexField.SearchConfig.getDefaultInstance();
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates that this field supports search operations. This field
+ * is only currently supported for indexes with MONGODB_COMPATIBLE_API
+ * ApiScope.
+ *
+ *
+ * .google.firestore.admin.v1.Index.IndexField.SearchConfig search_config = 5;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.Builder,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfigOrBuilder>
+ internalGetSearchConfigFieldBuilder() {
+ if (searchConfigBuilder_ == null) {
+ if (!(valueModeCase_ == 5)) {
+ valueMode_ =
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.getDefaultInstance();
+ }
+ searchConfigBuilder_ =
+ new com.google.protobuf.SingleFieldBuilder<
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfig.Builder,
+ com.google.firestore.admin.v1.Index.IndexField.SearchConfigOrBuilder>(
+ (com.google.firestore.admin.v1.Index.IndexField.SearchConfig) valueMode_,
+ getParentForChildren(),
+ isClean());
+ valueMode_ = null;
+ }
+ valueModeCase_ = 5;
+ onChanged();
+ return searchConfigBuilder_;
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.firestore.admin.v1.Index.IndexField)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.Index.IndexField)
+ private static final com.google.firestore.admin.v1.Index.IndexField DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.firestore.admin.v1.Index.IndexField();
+ }
+
+ public static com.google.firestore.admin.v1.Index.IndexField getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public IndexField parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException()
+ .setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.IndexField getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+ }
+
+ public interface SearchIndexOptionsOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.Index.SearchIndexOptions)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ *
+ * Optional. The language to use for text search indexes. Used as the
+ * default language if not overridden at the document level by specifying
+ * the `text_language_override_field`. The language is specified as a BCP 47
+ * language code.
+ * For indexes with MONGODB_COMPATIBLE_API ApiScope: If unspecified, the
+ * default language is English.
+ * For indexes with `ANY_API` ApiScope: If unspecified, the default behavior
+ * is autodetect.
+ *
+ *
+ * string text_language = 1 [(.google.api.field_behavior) = OPTIONAL];
*
- * @return The enum numeric value on the wire for arrayConfig.
+ * @return The textLanguage.
*/
- public int getArrayConfigValue() {
- if (valueModeCase_ == 3) {
- return (java.lang.Integer) valueMode_;
- }
- return 0;
+ java.lang.String getTextLanguage();
+
+ /**
+ *
+ *
+ *
+ * Optional. The language to use for text search indexes. Used as the
+ * default language if not overridden at the document level by specifying
+ * the `text_language_override_field`. The language is specified as a BCP 47
+ * language code.
+ * For indexes with MONGODB_COMPATIBLE_API ApiScope: If unspecified, the
+ * default language is English.
+ * For indexes with `ANY_API` ApiScope: If unspecified, the default behavior
+ * is autodetect.
+ *
+ *
+ * string text_language = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for textLanguage.
+ */
+ com.google.protobuf.ByteString getTextLanguageBytes();
+
+ /**
+ *
+ *
+ *
+ * Optional. The field in the document that specifies which language to use
+ * for that specific document. For indexes with MONGODB_COMPATIBLE_API
+ * ApiScope: if unspecified, the language is taken from the "language" field
+ * if it exists or from `text_language` if it does not.
+ *
+ *
+ * string text_language_override_field_path = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The textLanguageOverrideFieldPath.
+ */
+ java.lang.String getTextLanguageOverrideFieldPath();
+
+ /**
+ *
+ *
+ *
+ * Optional. The field in the document that specifies which language to use
+ * for that specific document. For indexes with MONGODB_COMPATIBLE_API
+ * ApiScope: if unspecified, the language is taken from the "language" field
+ * if it exists or from `text_language` if it does not.
+ *
+ *
+ * string text_language_override_field_path = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The bytes for textLanguageOverrideFieldPath.
+ */
+ com.google.protobuf.ByteString getTextLanguageOverrideFieldPathBytes();
+ }
+
+ /**
+ *
+ *
+ *
+ * Options for search indexes at the definition level.
+ *
+ *
+ * Protobuf type {@code google.firestore.admin.v1.Index.SearchIndexOptions}
+ */
+ public static final class SearchIndexOptions extends com.google.protobuf.GeneratedMessage
+ implements
+ // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.Index.SearchIndexOptions)
+ SearchIndexOptionsOrBuilder {
+ private static final long serialVersionUID = 0L;
+
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 33,
+ /* patch= */ 2,
+ /* suffix= */ "",
+ "SearchIndexOptions");
+ }
+
+ // Use SearchIndexOptions.newBuilder() to construct.
+ private SearchIndexOptions(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ }
+
+ private SearchIndexOptions() {
+ textLanguage_ = "";
+ textLanguageOverrideFieldPath_ = "";
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.firestore.admin.v1.IndexProto
+ .internal_static_google_firestore_admin_v1_Index_SearchIndexOptions_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.firestore.admin.v1.IndexProto
+ .internal_static_google_firestore_admin_v1_Index_SearchIndexOptions_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.firestore.admin.v1.Index.SearchIndexOptions.class,
+ com.google.firestore.admin.v1.Index.SearchIndexOptions.Builder.class);
}
+ public static final int TEXT_LANGUAGE_FIELD_NUMBER = 1;
+
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object textLanguage_ = "";
+
/**
*
*
*
- * Indicates that this field supports operations on `array_value`s.
+ * Optional. The language to use for text search indexes. Used as the
+ * default language if not overridden at the document level by specifying
+ * the `text_language_override_field`. The language is specified as a BCP 47
+ * language code.
+ * For indexes with MONGODB_COMPATIBLE_API ApiScope: If unspecified, the
+ * default language is English.
+ * For indexes with `ANY_API` ApiScope: If unspecified, the default behavior
+ * is autodetect.
*
*
- * .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3;
+ * string text_language = 1 [(.google.api.field_behavior) = OPTIONAL];
*
- * @return The arrayConfig.
+ * @return The textLanguage.
*/
- public com.google.firestore.admin.v1.Index.IndexField.ArrayConfig getArrayConfig() {
- if (valueModeCase_ == 3) {
- com.google.firestore.admin.v1.Index.IndexField.ArrayConfig result =
- com.google.firestore.admin.v1.Index.IndexField.ArrayConfig.forNumber(
- (java.lang.Integer) valueMode_);
- return result == null
- ? com.google.firestore.admin.v1.Index.IndexField.ArrayConfig.UNRECOGNIZED
- : result;
+ @java.lang.Override
+ public java.lang.String getTextLanguage() {
+ java.lang.Object ref = textLanguage_;
+ 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();
+ textLanguage_ = s;
+ return s;
}
- return com.google.firestore.admin.v1.Index.IndexField.ArrayConfig.ARRAY_CONFIG_UNSPECIFIED;
}
- public static final int VECTOR_CONFIG_FIELD_NUMBER = 4;
-
/**
*
*
*
- * Indicates that this field supports nearest neighbor and distance
- * operations on vector.
+ * Optional. The language to use for text search indexes. Used as the
+ * default language if not overridden at the document level by specifying
+ * the `text_language_override_field`. The language is specified as a BCP 47
+ * language code.
+ * For indexes with MONGODB_COMPATIBLE_API ApiScope: If unspecified, the
+ * default language is English.
+ * For indexes with `ANY_API` ApiScope: If unspecified, the default behavior
+ * is autodetect.
*
*
- * .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4;
+ * string text_language = 1 [(.google.api.field_behavior) = OPTIONAL];
*
- * @return Whether the vectorConfig field is set.
+ * @return The bytes for textLanguage.
*/
@java.lang.Override
- public boolean hasVectorConfig() {
- return valueModeCase_ == 4;
+ public com.google.protobuf.ByteString getTextLanguageBytes() {
+ java.lang.Object ref = textLanguage_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ textLanguage_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
}
+ public static final int TEXT_LANGUAGE_OVERRIDE_FIELD_PATH_FIELD_NUMBER = 2;
+
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object textLanguageOverrideFieldPath_ = "";
+
/**
*
*
*
- * Indicates that this field supports nearest neighbor and distance
- * operations on vector.
+ * Optional. The field in the document that specifies which language to use
+ * for that specific document. For indexes with MONGODB_COMPATIBLE_API
+ * ApiScope: if unspecified, the language is taken from the "language" field
+ * if it exists or from `text_language` if it does not.
*
*
- * .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4;
+ * string text_language_override_field_path = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
*
- * @return The vectorConfig.
+ * @return The textLanguageOverrideFieldPath.
*/
@java.lang.Override
- public com.google.firestore.admin.v1.Index.IndexField.VectorConfig getVectorConfig() {
- if (valueModeCase_ == 4) {
- return (com.google.firestore.admin.v1.Index.IndexField.VectorConfig) valueMode_;
+ public java.lang.String getTextLanguageOverrideFieldPath() {
+ java.lang.Object ref = textLanguageOverrideFieldPath_;
+ 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();
+ textLanguageOverrideFieldPath_ = s;
+ return s;
}
- return com.google.firestore.admin.v1.Index.IndexField.VectorConfig.getDefaultInstance();
}
/**
*
*
*
- * Indicates that this field supports nearest neighbor and distance
- * operations on vector.
+ * Optional. The field in the document that specifies which language to use
+ * for that specific document. For indexes with MONGODB_COMPATIBLE_API
+ * ApiScope: if unspecified, the language is taken from the "language" field
+ * if it exists or from `text_language` if it does not.
*
*
- * .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4;
+ * string text_language_override_field_path = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The bytes for textLanguageOverrideFieldPath.
*/
@java.lang.Override
- public com.google.firestore.admin.v1.Index.IndexField.VectorConfigOrBuilder
- getVectorConfigOrBuilder() {
- if (valueModeCase_ == 4) {
- return (com.google.firestore.admin.v1.Index.IndexField.VectorConfig) valueMode_;
+ public com.google.protobuf.ByteString getTextLanguageOverrideFieldPathBytes() {
+ java.lang.Object ref = textLanguageOverrideFieldPath_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ textLanguageOverrideFieldPath_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
}
- return com.google.firestore.admin.v1.Index.IndexField.VectorConfig.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
@@ -3178,18 +8987,11 @@ public final boolean isInitialized() {
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
- if (!com.google.protobuf.GeneratedMessage.isStringEmpty(fieldPath_)) {
- com.google.protobuf.GeneratedMessage.writeString(output, 1, fieldPath_);
- }
- if (valueModeCase_ == 2) {
- output.writeEnum(2, ((java.lang.Integer) valueMode_));
- }
- if (valueModeCase_ == 3) {
- output.writeEnum(3, ((java.lang.Integer) valueMode_));
+ if (!com.google.protobuf.GeneratedMessage.isStringEmpty(textLanguage_)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 1, textLanguage_);
}
- if (valueModeCase_ == 4) {
- output.writeMessage(
- 4, (com.google.firestore.admin.v1.Index.IndexField.VectorConfig) valueMode_);
+ if (!com.google.protobuf.GeneratedMessage.isStringEmpty(textLanguageOverrideFieldPath_)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 2, textLanguageOverrideFieldPath_);
}
getUnknownFields().writeTo(output);
}
@@ -3200,23 +9002,13 @@ public int getSerializedSize() {
if (size != -1) return size;
size = 0;
- if (!com.google.protobuf.GeneratedMessage.isStringEmpty(fieldPath_)) {
- size += com.google.protobuf.GeneratedMessage.computeStringSize(1, fieldPath_);
- }
- if (valueModeCase_ == 2) {
- size +=
- com.google.protobuf.CodedOutputStream.computeEnumSize(
- 2, ((java.lang.Integer) valueMode_));
- }
- if (valueModeCase_ == 3) {
- size +=
- com.google.protobuf.CodedOutputStream.computeEnumSize(
- 3, ((java.lang.Integer) valueMode_));
+ if (!com.google.protobuf.GeneratedMessage.isStringEmpty(textLanguage_)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(1, textLanguage_);
}
- if (valueModeCase_ == 4) {
+ if (!com.google.protobuf.GeneratedMessage.isStringEmpty(textLanguageOverrideFieldPath_)) {
size +=
- com.google.protobuf.CodedOutputStream.computeMessageSize(
- 4, (com.google.firestore.admin.v1.Index.IndexField.VectorConfig) valueMode_);
+ com.google.protobuf.GeneratedMessage.computeStringSize(
+ 2, textLanguageOverrideFieldPath_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
@@ -3228,27 +9020,15 @@ public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
- if (!(obj instanceof com.google.firestore.admin.v1.Index.IndexField)) {
+ if (!(obj instanceof com.google.firestore.admin.v1.Index.SearchIndexOptions)) {
return super.equals(obj);
}
- com.google.firestore.admin.v1.Index.IndexField other =
- (com.google.firestore.admin.v1.Index.IndexField) obj;
+ com.google.firestore.admin.v1.Index.SearchIndexOptions other =
+ (com.google.firestore.admin.v1.Index.SearchIndexOptions) obj;
- if (!getFieldPath().equals(other.getFieldPath())) return false;
- if (!getValueModeCase().equals(other.getValueModeCase())) return false;
- switch (valueModeCase_) {
- case 2:
- if (getOrderValue() != other.getOrderValue()) return false;
- break;
- case 3:
- if (getArrayConfigValue() != other.getArrayConfigValue()) return false;
- break;
- case 4:
- if (!getVectorConfig().equals(other.getVectorConfig())) return false;
- break;
- case 0:
- default:
- }
+ if (!getTextLanguage().equals(other.getTextLanguage())) return false;
+ if (!getTextLanguageOverrideFieldPath().equals(other.getTextLanguageOverrideFieldPath()))
+ return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -3260,94 +9040,80 @@ public int hashCode() {
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + FIELD_PATH_FIELD_NUMBER;
- hash = (53 * hash) + getFieldPath().hashCode();
- switch (valueModeCase_) {
- case 2:
- hash = (37 * hash) + ORDER_FIELD_NUMBER;
- hash = (53 * hash) + getOrderValue();
- break;
- case 3:
- hash = (37 * hash) + ARRAY_CONFIG_FIELD_NUMBER;
- hash = (53 * hash) + getArrayConfigValue();
- break;
- case 4:
- hash = (37 * hash) + VECTOR_CONFIG_FIELD_NUMBER;
- hash = (53 * hash) + getVectorConfig().hashCode();
- break;
- case 0:
- default:
- }
+ hash = (37 * hash) + TEXT_LANGUAGE_FIELD_NUMBER;
+ hash = (53 * hash) + getTextLanguage().hashCode();
+ hash = (37 * hash) + TEXT_LANGUAGE_OVERRIDE_FIELD_PATH_FIELD_NUMBER;
+ hash = (53 * hash) + getTextLanguageOverrideFieldPath().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
- public static com.google.firestore.admin.v1.Index.IndexField parseFrom(java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ public static com.google.firestore.admin.v1.Index.SearchIndexOptions parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static com.google.firestore.admin.v1.Index.IndexField parseFrom(
+ public static com.google.firestore.admin.v1.Index.SearchIndexOptions parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static com.google.firestore.admin.v1.Index.IndexField parseFrom(
+ public static com.google.firestore.admin.v1.Index.SearchIndexOptions parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static com.google.firestore.admin.v1.Index.IndexField parseFrom(
+ public static com.google.firestore.admin.v1.Index.SearchIndexOptions parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static com.google.firestore.admin.v1.Index.IndexField parseFrom(byte[] data)
+ public static com.google.firestore.admin.v1.Index.SearchIndexOptions parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static com.google.firestore.admin.v1.Index.IndexField parseFrom(
+ public static com.google.firestore.admin.v1.Index.SearchIndexOptions parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static com.google.firestore.admin.v1.Index.IndexField parseFrom(
+ public static com.google.firestore.admin.v1.Index.SearchIndexOptions parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
}
- public static com.google.firestore.admin.v1.Index.IndexField parseFrom(
+ public static com.google.firestore.admin.v1.Index.SearchIndexOptions parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage.parseWithIOException(
PARSER, input, extensionRegistry);
}
- public static com.google.firestore.admin.v1.Index.IndexField parseDelimitedFrom(
+ public static com.google.firestore.admin.v1.Index.SearchIndexOptions parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input);
}
- public static com.google.firestore.admin.v1.Index.IndexField parseDelimitedFrom(
+ public static com.google.firestore.admin.v1.Index.SearchIndexOptions parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
- public static com.google.firestore.admin.v1.Index.IndexField parseFrom(
+ public static com.google.firestore.admin.v1.Index.SearchIndexOptions parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
}
- public static com.google.firestore.admin.v1.Index.IndexField parseFrom(
+ public static com.google.firestore.admin.v1.Index.SearchIndexOptions parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@@ -3364,7 +9130,8 @@ public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
- public static Builder newBuilder(com.google.firestore.admin.v1.Index.IndexField prototype) {
+ public static Builder newBuilder(
+ com.google.firestore.admin.v1.Index.SearchIndexOptions prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@@ -3377,574 +9144,260 @@ public Builder toBuilder() {
protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
- }
-
- /**
- *
- *
- *
- * A field in an index.
- * The field_path describes which field is indexed, the value_mode describes
- * how the field value is indexed.
- *
- *
- * Protobuf type {@code google.firestore.admin.v1.Index.IndexField}
- */
- public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder
- implements
- // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.Index.IndexField)
- com.google.firestore.admin.v1.Index.IndexFieldOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.google.firestore.admin.v1.IndexProto
- .internal_static_google_firestore_admin_v1_Index_IndexField_descriptor;
- }
-
- @java.lang.Override
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.firestore.admin.v1.IndexProto
- .internal_static_google_firestore_admin_v1_Index_IndexField_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.firestore.admin.v1.Index.IndexField.class,
- com.google.firestore.admin.v1.Index.IndexField.Builder.class);
- }
-
- // Construct using com.google.firestore.admin.v1.Index.IndexField.newBuilder()
- private Builder() {}
-
- private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
- super(parent);
- }
-
- @java.lang.Override
- public Builder clear() {
- super.clear();
- bitField0_ = 0;
- fieldPath_ = "";
- if (vectorConfigBuilder_ != null) {
- vectorConfigBuilder_.clear();
- }
- valueModeCase_ = 0;
- valueMode_ = null;
- return this;
- }
-
- @java.lang.Override
- public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
- return com.google.firestore.admin.v1.IndexProto
- .internal_static_google_firestore_admin_v1_Index_IndexField_descriptor;
- }
-
- @java.lang.Override
- public com.google.firestore.admin.v1.Index.IndexField getDefaultInstanceForType() {
- return com.google.firestore.admin.v1.Index.IndexField.getDefaultInstance();
- }
-
- @java.lang.Override
- public com.google.firestore.admin.v1.Index.IndexField build() {
- com.google.firestore.admin.v1.Index.IndexField result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @java.lang.Override
- public com.google.firestore.admin.v1.Index.IndexField buildPartial() {
- com.google.firestore.admin.v1.Index.IndexField result =
- new com.google.firestore.admin.v1.Index.IndexField(this);
- if (bitField0_ != 0) {
- buildPartial0(result);
- }
- buildPartialOneofs(result);
- onBuilt();
- return result;
- }
-
- private void buildPartial0(com.google.firestore.admin.v1.Index.IndexField result) {
- int from_bitField0_ = bitField0_;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.fieldPath_ = fieldPath_;
- }
- }
-
- private void buildPartialOneofs(com.google.firestore.admin.v1.Index.IndexField result) {
- result.valueModeCase_ = valueModeCase_;
- result.valueMode_ = this.valueMode_;
- if (valueModeCase_ == 4 && vectorConfigBuilder_ != null) {
- result.valueMode_ = vectorConfigBuilder_.build();
- }
- }
-
- @java.lang.Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.google.firestore.admin.v1.Index.IndexField) {
- return mergeFrom((com.google.firestore.admin.v1.Index.IndexField) other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.firestore.admin.v1.Index.IndexField other) {
- if (other == com.google.firestore.admin.v1.Index.IndexField.getDefaultInstance())
- return this;
- if (!other.getFieldPath().isEmpty()) {
- fieldPath_ = other.fieldPath_;
- bitField0_ |= 0x00000001;
- onChanged();
- }
- switch (other.getValueModeCase()) {
- case ORDER:
- {
- setOrderValue(other.getOrderValue());
- break;
- }
- case ARRAY_CONFIG:
- {
- setArrayConfigValue(other.getArrayConfigValue());
- break;
- }
- case VECTOR_CONFIG:
- {
- mergeVectorConfig(other.getVectorConfig());
- break;
- }
- case VALUEMODE_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:
- {
- fieldPath_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000001;
- break;
- } // case 10
- case 16:
- {
- int rawValue = input.readEnum();
- valueModeCase_ = 2;
- valueMode_ = rawValue;
- break;
- } // case 16
- case 24:
- {
- int rawValue = input.readEnum();
- valueModeCase_ = 3;
- valueMode_ = rawValue;
- break;
- } // case 24
- case 34:
- {
- input.readMessage(
- internalGetVectorConfigFieldBuilder().getBuilder(), extensionRegistry);
- valueModeCase_ = 4;
- 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 valueModeCase_ = 0;
- private java.lang.Object valueMode_;
-
- public ValueModeCase getValueModeCase() {
- return ValueModeCase.forNumber(valueModeCase_);
- }
-
- public Builder clearValueMode() {
- valueModeCase_ = 0;
- valueMode_ = null;
- onChanged();
- return this;
- }
-
- private int bitField0_;
-
- private java.lang.Object fieldPath_ = "";
-
- /**
- *
- *
- *
- * Can be __name__.
- * For single field indexes, this must match the name of the field or may
- * be omitted.
- *
- *
- * string field_path = 1;
- *
- * @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();
- fieldPath_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
+ }
- /**
- *
- *
- *
- * Can be __name__.
- * For single field indexes, this must match the name of the field or may
- * be omitted.
- *
- *
- * string field_path = 1;
- *
- * @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;
- }
+ /**
+ *
+ *
+ *
+ * Options for search indexes at the definition level.
+ *
+ *
+ * Protobuf type {@code google.firestore.admin.v1.Index.SearchIndexOptions}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder
+ implements
+ // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.Index.SearchIndexOptions)
+ com.google.firestore.admin.v1.Index.SearchIndexOptionsOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.firestore.admin.v1.IndexProto
+ .internal_static_google_firestore_admin_v1_Index_SearchIndexOptions_descriptor;
}
- /**
- *
- *
- *
- * Can be __name__.
- * For single field indexes, this must match the name of the field or may
- * be omitted.
- *
- *
- * string field_path = 1;
- *
- * @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;
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.firestore.admin.v1.IndexProto
+ .internal_static_google_firestore_admin_v1_Index_SearchIndexOptions_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.firestore.admin.v1.Index.SearchIndexOptions.class,
+ com.google.firestore.admin.v1.Index.SearchIndexOptions.Builder.class);
}
- /**
- *
- *
- *
- * Can be __name__.
- * For single field indexes, this must match the name of the field or may
- * be omitted.
- *
- *
- * string field_path = 1;
- *
- * @return This builder for chaining.
- */
- public Builder clearFieldPath() {
- fieldPath_ = getDefaultInstance().getFieldPath();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
+ // Construct using com.google.firestore.admin.v1.Index.SearchIndexOptions.newBuilder()
+ private Builder() {}
+
+ private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
}
- /**
- *
- *
- *
- * Can be __name__.
- * For single field indexes, this must match the name of the field or may
- * be omitted.
- *
- *
- * string field_path = 1;
- *
- * @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();
- }
- checkByteStringIsUtf8(value);
- fieldPath_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ textLanguage_ = "";
+ textLanguageOverrideFieldPath_ = "";
return this;
}
- /**
- *
- *
- *
- * Indicates that this field supports ordering by the specified order or
- * comparing using =, !=, <, <=, >, >=.
- *
- *
- * .google.firestore.admin.v1.Index.IndexField.Order order = 2;
- *
- * @return Whether the order field is set.
- */
@java.lang.Override
- public boolean hasOrder() {
- return valueModeCase_ == 2;
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.firestore.admin.v1.IndexProto
+ .internal_static_google_firestore_admin_v1_Index_SearchIndexOptions_descriptor;
}
- /**
- *
- *
- *
- * Indicates that this field supports ordering by the specified order or
- * comparing using =, !=, <, <=, >, >=.
- *
- *
- * .google.firestore.admin.v1.Index.IndexField.Order order = 2;
- *
- * @return The enum numeric value on the wire for order.
- */
@java.lang.Override
- public int getOrderValue() {
- if (valueModeCase_ == 2) {
- return ((java.lang.Integer) valueMode_).intValue();
- }
- return 0;
+ public com.google.firestore.admin.v1.Index.SearchIndexOptions getDefaultInstanceForType() {
+ return com.google.firestore.admin.v1.Index.SearchIndexOptions.getDefaultInstance();
}
- /**
- *
- *
- *
- * Indicates that this field supports ordering by the specified order or
- * comparing using =, !=, <, <=, >, >=.
- *
- *
- * .google.firestore.admin.v1.Index.IndexField.Order order = 2;
- *
- * @param value The enum numeric value on the wire for order to set.
- * @return This builder for chaining.
- */
- public Builder setOrderValue(int value) {
- valueModeCase_ = 2;
- valueMode_ = value;
- onChanged();
- return this;
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.SearchIndexOptions build() {
+ com.google.firestore.admin.v1.Index.SearchIndexOptions result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
}
- /**
- *
- *
- *
- * Indicates that this field supports ordering by the specified order or
- * comparing using =, !=, <, <=, >, >=.
- *
- *
- * .google.firestore.admin.v1.Index.IndexField.Order order = 2;
- *
- * @return The order.
- */
@java.lang.Override
- public com.google.firestore.admin.v1.Index.IndexField.Order getOrder() {
- if (valueModeCase_ == 2) {
- com.google.firestore.admin.v1.Index.IndexField.Order result =
- com.google.firestore.admin.v1.Index.IndexField.Order.forNumber(
- (java.lang.Integer) valueMode_);
- return result == null
- ? com.google.firestore.admin.v1.Index.IndexField.Order.UNRECOGNIZED
- : result;
+ public com.google.firestore.admin.v1.Index.SearchIndexOptions buildPartial() {
+ com.google.firestore.admin.v1.Index.SearchIndexOptions result =
+ new com.google.firestore.admin.v1.Index.SearchIndexOptions(this);
+ if (bitField0_ != 0) {
+ buildPartial0(result);
}
- return com.google.firestore.admin.v1.Index.IndexField.Order.ORDER_UNSPECIFIED;
+ onBuilt();
+ return result;
}
- /**
- *
- *
- *
- * Indicates that this field supports ordering by the specified order or
- * comparing using =, !=, <, <=, >, >=.
- *
- *
- * .google.firestore.admin.v1.Index.IndexField.Order order = 2;
- *
- * @param value The order to set.
- * @return This builder for chaining.
- */
- public Builder setOrder(com.google.firestore.admin.v1.Index.IndexField.Order value) {
- if (value == null) {
- throw new NullPointerException();
+ private void buildPartial0(com.google.firestore.admin.v1.Index.SearchIndexOptions result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.textLanguage_ = textLanguage_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.textLanguageOverrideFieldPath_ = textLanguageOverrideFieldPath_;
}
- valueModeCase_ = 2;
- valueMode_ = value.getNumber();
- onChanged();
- return this;
}
- /**
- *
- *
- *
- * Indicates that this field supports ordering by the specified order or
- * comparing using =, !=, <, <=, >, >=.
- *
- *
- * .google.firestore.admin.v1.Index.IndexField.Order order = 2;
- *
- * @return This builder for chaining.
- */
- public Builder clearOrder() {
- if (valueModeCase_ == 2) {
- valueModeCase_ = 0;
- valueMode_ = null;
- onChanged();
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.firestore.admin.v1.Index.SearchIndexOptions) {
+ return mergeFrom((com.google.firestore.admin.v1.Index.SearchIndexOptions) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
}
- return this;
}
- /**
- *
- *
- *
- * Indicates that this field supports operations on `array_value`s.
- *
- *
- * .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3;
- *
- * @return Whether the arrayConfig field is set.
- */
+ public Builder mergeFrom(com.google.firestore.admin.v1.Index.SearchIndexOptions other) {
+ if (other == com.google.firestore.admin.v1.Index.SearchIndexOptions.getDefaultInstance())
+ return this;
+ if (!other.getTextLanguage().isEmpty()) {
+ textLanguage_ = other.textLanguage_;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
+ if (!other.getTextLanguageOverrideFieldPath().isEmpty()) {
+ textLanguageOverrideFieldPath_ = other.textLanguageOverrideFieldPath_;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
@java.lang.Override
- public boolean hasArrayConfig() {
- return valueModeCase_ == 3;
+ public final boolean isInitialized() {
+ return true;
}
- /**
- *
- *
- *
- * Indicates that this field supports operations on `array_value`s.
- *
- *
- * .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3;
- *
- * @return The enum numeric value on the wire for arrayConfig.
- */
@java.lang.Override
- public int getArrayConfigValue() {
- if (valueModeCase_ == 3) {
- return ((java.lang.Integer) valueMode_).intValue();
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
}
- return 0;
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ textLanguage_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18:
+ {
+ textLanguageOverrideFieldPath_ = input.readStringRequireUtf8();
+ 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 textLanguage_ = "";
+
/**
*
*
*
- * Indicates that this field supports operations on `array_value`s.
+ * Optional. The language to use for text search indexes. Used as the
+ * default language if not overridden at the document level by specifying
+ * the `text_language_override_field`. The language is specified as a BCP 47
+ * language code.
+ * For indexes with MONGODB_COMPATIBLE_API ApiScope: If unspecified, the
+ * default language is English.
+ * For indexes with `ANY_API` ApiScope: If unspecified, the default behavior
+ * is autodetect.
*
*
- * .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3;
+ * string text_language = 1 [(.google.api.field_behavior) = OPTIONAL];
*
- * @param value The enum numeric value on the wire for arrayConfig to set.
- * @return This builder for chaining.
+ * @return The textLanguage.
*/
- public Builder setArrayConfigValue(int value) {
- valueModeCase_ = 3;
- valueMode_ = value;
- onChanged();
- return this;
+ public java.lang.String getTextLanguage() {
+ java.lang.Object ref = textLanguage_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ textLanguage_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
}
/**
*
*
*
- * Indicates that this field supports operations on `array_value`s.
+ * Optional. The language to use for text search indexes. Used as the
+ * default language if not overridden at the document level by specifying
+ * the `text_language_override_field`. The language is specified as a BCP 47
+ * language code.
+ * For indexes with MONGODB_COMPATIBLE_API ApiScope: If unspecified, the
+ * default language is English.
+ * For indexes with `ANY_API` ApiScope: If unspecified, the default behavior
+ * is autodetect.
*
*
- * .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3;
+ * string text_language = 1 [(.google.api.field_behavior) = OPTIONAL];
*
- * @return The arrayConfig.
+ * @return The bytes for textLanguage.
*/
- @java.lang.Override
- public com.google.firestore.admin.v1.Index.IndexField.ArrayConfig getArrayConfig() {
- if (valueModeCase_ == 3) {
- com.google.firestore.admin.v1.Index.IndexField.ArrayConfig result =
- com.google.firestore.admin.v1.Index.IndexField.ArrayConfig.forNumber(
- (java.lang.Integer) valueMode_);
- return result == null
- ? com.google.firestore.admin.v1.Index.IndexField.ArrayConfig.UNRECOGNIZED
- : result;
+ public com.google.protobuf.ByteString getTextLanguageBytes() {
+ java.lang.Object ref = textLanguage_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ textLanguage_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
}
- return com.google.firestore.admin.v1.Index.IndexField.ArrayConfig.ARRAY_CONFIG_UNSPECIFIED;
}
/**
*
*
*
- * Indicates that this field supports operations on `array_value`s.
+ * Optional. The language to use for text search indexes. Used as the
+ * default language if not overridden at the document level by specifying
+ * the `text_language_override_field`. The language is specified as a BCP 47
+ * language code.
+ * For indexes with MONGODB_COMPATIBLE_API ApiScope: If unspecified, the
+ * default language is English.
+ * For indexes with `ANY_API` ApiScope: If unspecified, the default behavior
+ * is autodetect.
*
*
- * .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3;
+ * string text_language = 1 [(.google.api.field_behavior) = OPTIONAL];
*
- * @param value The arrayConfig to set.
+ * @param value The textLanguage to set.
* @return This builder for chaining.
*/
- public Builder setArrayConfig(
- com.google.firestore.admin.v1.Index.IndexField.ArrayConfig value) {
+ public Builder setTextLanguage(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
- valueModeCase_ = 3;
- valueMode_ = value.getNumber();
+ textLanguage_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -3953,274 +9406,211 @@ public Builder setArrayConfig(
*
*
*
- * Indicates that this field supports operations on `array_value`s.
+ * Optional. The language to use for text search indexes. Used as the
+ * default language if not overridden at the document level by specifying
+ * the `text_language_override_field`. The language is specified as a BCP 47
+ * language code.
+ * For indexes with MONGODB_COMPATIBLE_API ApiScope: If unspecified, the
+ * default language is English.
+ * For indexes with `ANY_API` ApiScope: If unspecified, the default behavior
+ * is autodetect.
*
*
- * .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3;
+ * string text_language = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
- public Builder clearArrayConfig() {
- if (valueModeCase_ == 3) {
- valueModeCase_ = 0;
- valueMode_ = null;
- onChanged();
- }
+ public Builder clearTextLanguage() {
+ textLanguage_ = getDefaultInstance().getTextLanguage();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
return this;
}
- private com.google.protobuf.SingleFieldBuilder<
- com.google.firestore.admin.v1.Index.IndexField.VectorConfig,
- com.google.firestore.admin.v1.Index.IndexField.VectorConfig.Builder,
- com.google.firestore.admin.v1.Index.IndexField.VectorConfigOrBuilder>
- vectorConfigBuilder_;
-
- /**
- *
- *
- *
- * Indicates that this field supports nearest neighbor and distance
- * operations on vector.
- *
- *
- * .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4;
- *
- * @return Whether the vectorConfig field is set.
- */
- @java.lang.Override
- public boolean hasVectorConfig() {
- return valueModeCase_ == 4;
- }
-
/**
*
*
*
- * Indicates that this field supports nearest neighbor and distance
- * operations on vector.
+ * Optional. The language to use for text search indexes. Used as the
+ * default language if not overridden at the document level by specifying
+ * the `text_language_override_field`. The language is specified as a BCP 47
+ * language code.
+ * For indexes with MONGODB_COMPATIBLE_API ApiScope: If unspecified, the
+ * default language is English.
+ * For indexes with `ANY_API` ApiScope: If unspecified, the default behavior
+ * is autodetect.
*
*
- * .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4;
- *
- * @return The vectorConfig.
- */
- @java.lang.Override
- public com.google.firestore.admin.v1.Index.IndexField.VectorConfig getVectorConfig() {
- if (vectorConfigBuilder_ == null) {
- if (valueModeCase_ == 4) {
- return (com.google.firestore.admin.v1.Index.IndexField.VectorConfig) valueMode_;
- }
- return com.google.firestore.admin.v1.Index.IndexField.VectorConfig.getDefaultInstance();
- } else {
- if (valueModeCase_ == 4) {
- return vectorConfigBuilder_.getMessage();
- }
- return com.google.firestore.admin.v1.Index.IndexField.VectorConfig.getDefaultInstance();
- }
- }
-
- /**
- *
+ * string text_language = 1 [(.google.api.field_behavior) = OPTIONAL];
*
- *
- * Indicates that this field supports nearest neighbor and distance
- * operations on vector.
- *
- *
- * .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4;
+ * @param value The bytes for textLanguage to set.
+ * @return This builder for chaining.
*/
- public Builder setVectorConfig(
- com.google.firestore.admin.v1.Index.IndexField.VectorConfig value) {
- if (vectorConfigBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- valueMode_ = value;
- onChanged();
- } else {
- vectorConfigBuilder_.setMessage(value);
+ public Builder setTextLanguageBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
}
- valueModeCase_ = 4;
+ checkByteStringIsUtf8(value);
+ textLanguage_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
return this;
}
- /**
- *
- *
- *
- * Indicates that this field supports nearest neighbor and distance
- * operations on vector.
- *
- *
- * .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4;
- */
- public Builder setVectorConfig(
- com.google.firestore.admin.v1.Index.IndexField.VectorConfig.Builder builderForValue) {
- if (vectorConfigBuilder_ == null) {
- valueMode_ = builderForValue.build();
- onChanged();
- } else {
- vectorConfigBuilder_.setMessage(builderForValue.build());
- }
- valueModeCase_ = 4;
- return this;
- }
+ private java.lang.Object textLanguageOverrideFieldPath_ = "";
/**
*
*
*
- * Indicates that this field supports nearest neighbor and distance
- * operations on vector.
+ * Optional. The field in the document that specifies which language to use
+ * for that specific document. For indexes with MONGODB_COMPATIBLE_API
+ * ApiScope: if unspecified, the language is taken from the "language" field
+ * if it exists or from `text_language` if it does not.
*
*
- * .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4;
+ *
+ * string text_language_override_field_path = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The textLanguageOverrideFieldPath.
*/
- public Builder mergeVectorConfig(
- com.google.firestore.admin.v1.Index.IndexField.VectorConfig value) {
- if (vectorConfigBuilder_ == null) {
- if (valueModeCase_ == 4
- && valueMode_
- != com.google.firestore.admin.v1.Index.IndexField.VectorConfig
- .getDefaultInstance()) {
- valueMode_ =
- com.google.firestore.admin.v1.Index.IndexField.VectorConfig.newBuilder(
- (com.google.firestore.admin.v1.Index.IndexField.VectorConfig) valueMode_)
- .mergeFrom(value)
- .buildPartial();
- } else {
- valueMode_ = value;
- }
- onChanged();
+ public java.lang.String getTextLanguageOverrideFieldPath() {
+ java.lang.Object ref = textLanguageOverrideFieldPath_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ textLanguageOverrideFieldPath_ = s;
+ return s;
} else {
- if (valueModeCase_ == 4) {
- vectorConfigBuilder_.mergeFrom(value);
- } else {
- vectorConfigBuilder_.setMessage(value);
- }
+ return (java.lang.String) ref;
}
- valueModeCase_ = 4;
- return this;
}
/**
*
*
*
- * Indicates that this field supports nearest neighbor and distance
- * operations on vector.
+ * Optional. The field in the document that specifies which language to use
+ * for that specific document. For indexes with MONGODB_COMPATIBLE_API
+ * ApiScope: if unspecified, the language is taken from the "language" field
+ * if it exists or from `text_language` if it does not.
*
*
- * .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4;
+ *
+ * string text_language_override_field_path = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The bytes for textLanguageOverrideFieldPath.
*/
- public Builder clearVectorConfig() {
- if (vectorConfigBuilder_ == null) {
- if (valueModeCase_ == 4) {
- valueModeCase_ = 0;
- valueMode_ = null;
- onChanged();
- }
- } else {
- if (valueModeCase_ == 4) {
- valueModeCase_ = 0;
- valueMode_ = null;
- }
- vectorConfigBuilder_.clear();
+ public com.google.protobuf.ByteString getTextLanguageOverrideFieldPathBytes() {
+ java.lang.Object ref = textLanguageOverrideFieldPath_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ textLanguageOverrideFieldPath_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
}
- return this;
}
/**
*
*
*
- * Indicates that this field supports nearest neighbor and distance
- * operations on vector.
+ * Optional. The field in the document that specifies which language to use
+ * for that specific document. For indexes with MONGODB_COMPATIBLE_API
+ * ApiScope: if unspecified, the language is taken from the "language" field
+ * if it exists or from `text_language` if it does not.
*
*
- * .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4;
+ *
+ * string text_language_override_field_path = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @param value The textLanguageOverrideFieldPath to set.
+ * @return This builder for chaining.
*/
- public com.google.firestore.admin.v1.Index.IndexField.VectorConfig.Builder
- getVectorConfigBuilder() {
- return internalGetVectorConfigFieldBuilder().getBuilder();
+ public Builder setTextLanguageOverrideFieldPath(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ textLanguageOverrideFieldPath_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
}
/**
*
*
*
- * Indicates that this field supports nearest neighbor and distance
- * operations on vector.
+ * Optional. The field in the document that specifies which language to use
+ * for that specific document. For indexes with MONGODB_COMPATIBLE_API
+ * ApiScope: if unspecified, the language is taken from the "language" field
+ * if it exists or from `text_language` if it does not.
*
*
- * .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4;
+ *
+ * string text_language_override_field_path = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return This builder for chaining.
*/
- @java.lang.Override
- public com.google.firestore.admin.v1.Index.IndexField.VectorConfigOrBuilder
- getVectorConfigOrBuilder() {
- if ((valueModeCase_ == 4) && (vectorConfigBuilder_ != null)) {
- return vectorConfigBuilder_.getMessageOrBuilder();
- } else {
- if (valueModeCase_ == 4) {
- return (com.google.firestore.admin.v1.Index.IndexField.VectorConfig) valueMode_;
- }
- return com.google.firestore.admin.v1.Index.IndexField.VectorConfig.getDefaultInstance();
- }
+ public Builder clearTextLanguageOverrideFieldPath() {
+ textLanguageOverrideFieldPath_ = getDefaultInstance().getTextLanguageOverrideFieldPath();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
}
/**
*
*
*
- * Indicates that this field supports nearest neighbor and distance
- * operations on vector.
+ * Optional. The field in the document that specifies which language to use
+ * for that specific document. For indexes with MONGODB_COMPATIBLE_API
+ * ApiScope: if unspecified, the language is taken from the "language" field
+ * if it exists or from `text_language` if it does not.
*
*
- * .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4;
+ *
+ * string text_language_override_field_path = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @param value The bytes for textLanguageOverrideFieldPath to set.
+ * @return This builder for chaining.
*/
- private com.google.protobuf.SingleFieldBuilder<
- com.google.firestore.admin.v1.Index.IndexField.VectorConfig,
- com.google.firestore.admin.v1.Index.IndexField.VectorConfig.Builder,
- com.google.firestore.admin.v1.Index.IndexField.VectorConfigOrBuilder>
- internalGetVectorConfigFieldBuilder() {
- if (vectorConfigBuilder_ == null) {
- if (!(valueModeCase_ == 4)) {
- valueMode_ =
- com.google.firestore.admin.v1.Index.IndexField.VectorConfig.getDefaultInstance();
- }
- vectorConfigBuilder_ =
- new com.google.protobuf.SingleFieldBuilder<
- com.google.firestore.admin.v1.Index.IndexField.VectorConfig,
- com.google.firestore.admin.v1.Index.IndexField.VectorConfig.Builder,
- com.google.firestore.admin.v1.Index.IndexField.VectorConfigOrBuilder>(
- (com.google.firestore.admin.v1.Index.IndexField.VectorConfig) valueMode_,
- getParentForChildren(),
- isClean());
- valueMode_ = null;
+ public Builder setTextLanguageOverrideFieldPathBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
}
- valueModeCase_ = 4;
+ checkByteStringIsUtf8(value);
+ textLanguageOverrideFieldPath_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
- return vectorConfigBuilder_;
+ return this;
}
- // @@protoc_insertion_point(builder_scope:google.firestore.admin.v1.Index.IndexField)
+ // @@protoc_insertion_point(builder_scope:google.firestore.admin.v1.Index.SearchIndexOptions)
}
- // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.Index.IndexField)
- private static final com.google.firestore.admin.v1.Index.IndexField DEFAULT_INSTANCE;
+ // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.Index.SearchIndexOptions)
+ private static final com.google.firestore.admin.v1.Index.SearchIndexOptions DEFAULT_INSTANCE;
static {
- DEFAULT_INSTANCE = new com.google.firestore.admin.v1.Index.IndexField();
+ DEFAULT_INSTANCE = new com.google.firestore.admin.v1.Index.SearchIndexOptions();
}
- public static com.google.firestore.admin.v1.Index.IndexField getDefaultInstance() {
+ public static com.google.firestore.admin.v1.Index.SearchIndexOptions getDefaultInstance() {
return DEFAULT_INSTANCE;
}
- private static final com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
+ private static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
@java.lang.Override
- public IndexField parsePartialFrom(
+ public SearchIndexOptions parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
@@ -4240,21 +9630,22 @@ public IndexField parsePartialFrom(
}
};
- public static com.google.protobuf.Parser parser() {
+ public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
+ public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
- public com.google.firestore.admin.v1.Index.IndexField getDefaultInstanceForType() {
+ public com.google.firestore.admin.v1.Index.SearchIndexOptions getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
+ private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
@@ -4669,6 +10060,72 @@ public boolean getUnique() {
return unique_;
}
+ public static final int SEARCH_INDEX_OPTIONS_FIELD_NUMBER = 9;
+ private com.google.firestore.admin.v1.Index.SearchIndexOptions searchIndexOptions_;
+
+ /**
+ *
+ *
+ *
+ * Optional. Options for search indexes that are at the index definition
+ * level. This field is only currently supported for indexes with
+ * MONGODB_COMPATIBLE_API ApiScope.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.SearchIndexOptions search_index_options = 9 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the searchIndexOptions field is set.
+ */
+ @java.lang.Override
+ public boolean hasSearchIndexOptions() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. Options for search indexes that are at the index definition
+ * level. This field is only currently supported for indexes with
+ * MONGODB_COMPATIBLE_API ApiScope.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.SearchIndexOptions search_index_options = 9 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The searchIndexOptions.
+ */
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.SearchIndexOptions getSearchIndexOptions() {
+ return searchIndexOptions_ == null
+ ? com.google.firestore.admin.v1.Index.SearchIndexOptions.getDefaultInstance()
+ : searchIndexOptions_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. Options for search indexes that are at the index definition
+ * level. This field is only currently supported for indexes with
+ * MONGODB_COMPATIBLE_API ApiScope.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.SearchIndexOptions search_index_options = 9 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public com.google.firestore.admin.v1.Index.SearchIndexOptionsOrBuilder
+ getSearchIndexOptionsOrBuilder() {
+ return searchIndexOptions_ == null
+ ? com.google.firestore.admin.v1.Index.SearchIndexOptions.getDefaultInstance()
+ : searchIndexOptions_;
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -4708,6 +10165,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (shardCount_ != 0) {
output.writeInt32(8, shardCount_);
}
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeMessage(9, getSearchIndexOptions());
+ }
if (unique_ != false) {
output.writeBool(10, unique_);
}
@@ -4745,6 +10205,9 @@ public int getSerializedSize() {
if (shardCount_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(8, shardCount_);
}
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getSearchIndexOptions());
+ }
if (unique_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(10, unique_);
}
@@ -4772,6 +10235,10 @@ public boolean equals(final java.lang.Object obj) {
if (getMultikey() != other.getMultikey()) return false;
if (getShardCount() != other.getShardCount()) return false;
if (getUnique() != other.getUnique()) return false;
+ if (hasSearchIndexOptions() != other.hasSearchIndexOptions()) return false;
+ if (hasSearchIndexOptions()) {
+ if (!getSearchIndexOptions().equals(other.getSearchIndexOptions())) return false;
+ }
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -4803,6 +10270,10 @@ public int hashCode() {
hash = (53 * hash) + getShardCount();
hash = (37 * hash) + UNIQUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUnique());
+ if (hasSearchIndexOptions()) {
+ hash = (37 * hash) + SEARCH_INDEX_OPTIONS_FIELD_NUMBER;
+ hash = (53 * hash) + getSearchIndexOptions().hashCode();
+ }
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
@@ -4933,10 +10404,20 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.firestore.admin.v1.Index.newBuilder()
- private Builder() {}
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
+ maybeForceBuilderInitialization();
+ }
+
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+ internalGetFieldsFieldBuilder();
+ internalGetSearchIndexOptionsFieldBuilder();
+ }
}
@java.lang.Override
@@ -4958,6 +10439,11 @@ public Builder clear() {
multikey_ = false;
shardCount_ = 0;
unique_ = false;
+ searchIndexOptions_ = null;
+ if (searchIndexOptionsBuilder_ != null) {
+ searchIndexOptionsBuilder_.dispose();
+ searchIndexOptionsBuilder_ = null;
+ }
return this;
}
@@ -5030,6 +10516,15 @@ private void buildPartial0(com.google.firestore.admin.v1.Index result) {
if (((from_bitField0_ & 0x00000100) != 0)) {
result.unique_ = unique_;
}
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000200) != 0)) {
+ result.searchIndexOptions_ =
+ searchIndexOptionsBuilder_ == null
+ ? searchIndexOptions_
+ : searchIndexOptionsBuilder_.build();
+ to_bitField0_ |= 0x00000001;
+ }
+ result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
@@ -5097,6 +10592,9 @@ public Builder mergeFrom(com.google.firestore.admin.v1.Index other) {
if (other.getUnique() != false) {
setUnique(other.getUnique());
}
+ if (other.hasSearchIndexOptions()) {
+ mergeSearchIndexOptions(other.getSearchIndexOptions());
+ }
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
@@ -5178,6 +10676,13 @@ public Builder mergeFrom(
bitField0_ |= 0x00000080;
break;
} // case 64
+ case 74:
+ {
+ input.readMessage(
+ internalGetSearchIndexOptionsFieldBuilder().getBuilder(), extensionRegistry);
+ bitField0_ |= 0x00000200;
+ break;
+ } // case 74
case 80:
{
unique_ = input.readBool();
@@ -6488,6 +11993,242 @@ public Builder clearUnique() {
return this;
}
+ private com.google.firestore.admin.v1.Index.SearchIndexOptions searchIndexOptions_;
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.firestore.admin.v1.Index.SearchIndexOptions,
+ com.google.firestore.admin.v1.Index.SearchIndexOptions.Builder,
+ com.google.firestore.admin.v1.Index.SearchIndexOptionsOrBuilder>
+ searchIndexOptionsBuilder_;
+
+ /**
+ *
+ *
+ *
+ * Optional. Options for search indexes that are at the index definition
+ * level. This field is only currently supported for indexes with
+ * MONGODB_COMPATIBLE_API ApiScope.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.SearchIndexOptions search_index_options = 9 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the searchIndexOptions field is set.
+ */
+ public boolean hasSearchIndexOptions() {
+ return ((bitField0_ & 0x00000200) != 0);
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. Options for search indexes that are at the index definition
+ * level. This field is only currently supported for indexes with
+ * MONGODB_COMPATIBLE_API ApiScope.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.SearchIndexOptions search_index_options = 9 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The searchIndexOptions.
+ */
+ public com.google.firestore.admin.v1.Index.SearchIndexOptions getSearchIndexOptions() {
+ if (searchIndexOptionsBuilder_ == null) {
+ return searchIndexOptions_ == null
+ ? com.google.firestore.admin.v1.Index.SearchIndexOptions.getDefaultInstance()
+ : searchIndexOptions_;
+ } else {
+ return searchIndexOptionsBuilder_.getMessage();
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. Options for search indexes that are at the index definition
+ * level. This field is only currently supported for indexes with
+ * MONGODB_COMPATIBLE_API ApiScope.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.SearchIndexOptions search_index_options = 9 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setSearchIndexOptions(
+ com.google.firestore.admin.v1.Index.SearchIndexOptions value) {
+ if (searchIndexOptionsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ searchIndexOptions_ = value;
+ } else {
+ searchIndexOptionsBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000200;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. Options for search indexes that are at the index definition
+ * level. This field is only currently supported for indexes with
+ * MONGODB_COMPATIBLE_API ApiScope.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.SearchIndexOptions search_index_options = 9 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setSearchIndexOptions(
+ com.google.firestore.admin.v1.Index.SearchIndexOptions.Builder builderForValue) {
+ if (searchIndexOptionsBuilder_ == null) {
+ searchIndexOptions_ = builderForValue.build();
+ } else {
+ searchIndexOptionsBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000200;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. Options for search indexes that are at the index definition
+ * level. This field is only currently supported for indexes with
+ * MONGODB_COMPATIBLE_API ApiScope.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.SearchIndexOptions search_index_options = 9 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder mergeSearchIndexOptions(
+ com.google.firestore.admin.v1.Index.SearchIndexOptions value) {
+ if (searchIndexOptionsBuilder_ == null) {
+ if (((bitField0_ & 0x00000200) != 0)
+ && searchIndexOptions_ != null
+ && searchIndexOptions_
+ != com.google.firestore.admin.v1.Index.SearchIndexOptions.getDefaultInstance()) {
+ getSearchIndexOptionsBuilder().mergeFrom(value);
+ } else {
+ searchIndexOptions_ = value;
+ }
+ } else {
+ searchIndexOptionsBuilder_.mergeFrom(value);
+ }
+ if (searchIndexOptions_ != null) {
+ bitField0_ |= 0x00000200;
+ onChanged();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. Options for search indexes that are at the index definition
+ * level. This field is only currently supported for indexes with
+ * MONGODB_COMPATIBLE_API ApiScope.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.SearchIndexOptions search_index_options = 9 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder clearSearchIndexOptions() {
+ bitField0_ = (bitField0_ & ~0x00000200);
+ searchIndexOptions_ = null;
+ if (searchIndexOptionsBuilder_ != null) {
+ searchIndexOptionsBuilder_.dispose();
+ searchIndexOptionsBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. Options for search indexes that are at the index definition
+ * level. This field is only currently supported for indexes with
+ * MONGODB_COMPATIBLE_API ApiScope.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.SearchIndexOptions search_index_options = 9 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.firestore.admin.v1.Index.SearchIndexOptions.Builder
+ getSearchIndexOptionsBuilder() {
+ bitField0_ |= 0x00000200;
+ onChanged();
+ return internalGetSearchIndexOptionsFieldBuilder().getBuilder();
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. Options for search indexes that are at the index definition
+ * level. This field is only currently supported for indexes with
+ * MONGODB_COMPATIBLE_API ApiScope.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.SearchIndexOptions search_index_options = 9 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.firestore.admin.v1.Index.SearchIndexOptionsOrBuilder
+ getSearchIndexOptionsOrBuilder() {
+ if (searchIndexOptionsBuilder_ != null) {
+ return searchIndexOptionsBuilder_.getMessageOrBuilder();
+ } else {
+ return searchIndexOptions_ == null
+ ? com.google.firestore.admin.v1.Index.SearchIndexOptions.getDefaultInstance()
+ : searchIndexOptions_;
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. Options for search indexes that are at the index definition
+ * level. This field is only currently supported for indexes with
+ * MONGODB_COMPATIBLE_API ApiScope.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.SearchIndexOptions search_index_options = 9 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.firestore.admin.v1.Index.SearchIndexOptions,
+ com.google.firestore.admin.v1.Index.SearchIndexOptions.Builder,
+ com.google.firestore.admin.v1.Index.SearchIndexOptionsOrBuilder>
+ internalGetSearchIndexOptionsFieldBuilder() {
+ if (searchIndexOptionsBuilder_ == null) {
+ searchIndexOptionsBuilder_ =
+ new com.google.protobuf.SingleFieldBuilder<
+ com.google.firestore.admin.v1.Index.SearchIndexOptions,
+ com.google.firestore.admin.v1.Index.SearchIndexOptions.Builder,
+ com.google.firestore.admin.v1.Index.SearchIndexOptionsOrBuilder>(
+ getSearchIndexOptions(), getParentForChildren(), isClean());
+ searchIndexOptions_ = null;
+ }
+ return searchIndexOptionsBuilder_;
+ }
+
// @@protoc_insertion_point(builder_scope:google.firestore.admin.v1.Index)
}
diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexOrBuilder.java
index ac40f5d483..4efa0e315f 100644
--- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexOrBuilder.java
+++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexOrBuilder.java
@@ -330,4 +330,53 @@ public interface IndexOrBuilder
* @return The unique.
*/
boolean getUnique();
+
+ /**
+ *
+ *
+ *
+ * Optional. Options for search indexes that are at the index definition
+ * level. This field is only currently supported for indexes with
+ * MONGODB_COMPATIBLE_API ApiScope.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.SearchIndexOptions search_index_options = 9 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the searchIndexOptions field is set.
+ */
+ boolean hasSearchIndexOptions();
+
+ /**
+ *
+ *
+ *
+ * Optional. Options for search indexes that are at the index definition
+ * level. This field is only currently supported for indexes with
+ * MONGODB_COMPATIBLE_API ApiScope.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.SearchIndexOptions search_index_options = 9 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The searchIndexOptions.
+ */
+ com.google.firestore.admin.v1.Index.SearchIndexOptions getSearchIndexOptions();
+
+ /**
+ *
+ *
+ *
+ * Optional. Options for search indexes that are at the index definition
+ * level. This field is only currently supported for indexes with
+ * MONGODB_COMPATIBLE_API ApiScope.
+ *
+ *
+ *
+ * .google.firestore.admin.v1.Index.SearchIndexOptions search_index_options = 9 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ com.google.firestore.admin.v1.Index.SearchIndexOptionsOrBuilder getSearchIndexOptionsOrBuilder();
}
diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexProto.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexProto.java
index 2f23955b7d..635837e1b4 100644
--- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexProto.java
+++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexProto.java
@@ -56,6 +56,26 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
internal_static_google_firestore_admin_v1_Index_IndexField_VectorConfig_FlatIndex_descriptor;
static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_google_firestore_admin_v1_Index_IndexField_VectorConfig_FlatIndex_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_descriptor;
+ static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_SearchTextIndexSpec_descriptor;
+ static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_SearchTextIndexSpec_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_SearchTextSpec_descriptor;
+ static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_SearchTextSpec_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_SearchGeoSpec_descriptor;
+ static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_SearchGeoSpec_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_firestore_admin_v1_Index_SearchIndexOptions_descriptor;
+ static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_google_firestore_admin_v1_Index_SearchIndexOptions_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
return descriptor;
@@ -68,7 +88,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"\n"
+ "%google/firestore/admin/v1/index.proto\022"
+ "\031google.firestore.admin.v1\032\037google/api/f"
- + "ield_behavior.proto\032\031google/api/resource.proto\"\202\013\n"
+ + "ield_behavior.proto\032\031google/api/resource.proto\"\365\022\n"
+ "\005Index\022\014\n"
+ "\004name\030\001 \001(\t\022@\n"
+ "\013query_scope\030\002 \001(\0162+.google.firestore.admin.v1.Index.QueryScope\022<\n"
@@ -80,21 +100,46 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\010multikey\030\007 \001(\010B\003\340A\001\022\030\n"
+ "\013shard_count\030\010 \001(\005B\003\340A\001\022\023\n"
+ "\006unique\030\n"
- + " \001(\010B\003\340A\001\032\242\004\n\n"
+ + " \001(\010B\003\340A\001\022V\n"
+ + "\024search_index_options\030\t \001(\01323"
+ + ".google.firestore.admin.v1.Index.SearchIndexOptionsB\003\340A\001\032\333\n\n\n"
+ "IndexField\022\022\n\n"
+ "field_path\030\001 \001(\t\022B\n"
- + "\005order\030\002"
- + " \001(\01621.google.firestore.admin.v1.Index.IndexField.OrderH\000\022O\n"
- + "\014array_config\030\003"
- + " \001(\01627.google.firestore.admin.v1.Index.IndexField.ArrayConfigH\000\022Q\n\r"
- + "vector_config\030\004"
- + " \001(\01328.google.firestore.admin.v1.Index.IndexField.VectorConfigH\000\032\217\001\n"
+ + "\005order\030\002 \001(\01621.google.fire"
+ + "store.admin.v1.Index.IndexField.OrderH\000\022O\n"
+ + "\014array_config\030\003 \001(\01627.google.firestore"
+ + ".admin.v1.Index.IndexField.ArrayConfigH\000\022Q\n\r"
+ + "vector_config\030\004 \001(\01328.google.firesto"
+ + "re.admin.v1.Index.IndexField.VectorConfigH\000\022Q\n\r"
+ + "search_config\030\005 \001(\01328.google.fire"
+ + "store.admin.v1.Index.IndexField.SearchConfigH\000\032\217\001\n"
+ "\014VectorConfig\022\026\n"
+ "\tdimension\030\001 \001(\005B\003\340A\002\022R\n"
- + "\004flat\030\002 \001(\0132B.google.firestore.admin.v1.I"
- + "ndex.IndexField.VectorConfig.FlatIndexH\000\032\013\n"
+ + "\004flat\030\002 \001(\0132B.google.firestore"
+ + ".admin.v1.Index.IndexField.VectorConfig.FlatIndexH\000\032\013\n"
+ "\tFlatIndexB\006\n"
- + "\004type\"=\n"
+ + "\004type\032\343\005\n"
+ + "\014SearchConfig\022_\n"
+ + "\ttext_spec\030\001 \001(\0132G.google.fi"
+ + "restore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpecB\003\340A\001\022]\n"
+ + "\010geo_spec\030\002 \001(\0132F.google.firestore.admin.v1.Index.I"
+ + "ndexField.SearchConfig.SearchGeoSpecB\003\340A\001\032\327\001\n"
+ + "\023SearchTextIndexSpec\022_\n\n"
+ + "index_type\030\001 \001(\0162F.google.firestore.admin.v1.Index."
+ + "IndexField.SearchConfig.TextIndexTypeB\003\340A\002\022_\n\n"
+ + "match_type\030\002 \001(\0162F.google.firestor"
+ + "e.admin.v1.Index.IndexField.SearchConfig.TextMatchTypeB\003\340A\002\032x\n"
+ + "\016SearchTextSpec\022f\n"
+ + "\013index_specs\030\001 \003(\0132L.google.firestore.ad"
+ + "min.v1.Index.IndexField.SearchConfig.SearchTextIndexSpecB\003\340A\002\0328\n\r"
+ + "SearchGeoSpec\022\'\n"
+ + "\032geo_json_indexing_disabled\030\001 \001(\010B\003\340A\001\"?\n\r"
+ + "TextIndexType\022\037\n"
+ + "\033TEXT_INDEX_TYPE_UNSPECIFIED\020\000\022\r\n"
+ + "\tTOKENIZED\020\001\"D\n\r"
+ + "TextMatchType\022\037\n"
+ + "\033TEXT_MATCH_TYPE_UNSPECIFIED\020\000\022\022\n"
+ + "\016MATCH_GLOBALLY\020\001\"=\n"
+ "\005Order\022\025\n"
+ "\021ORDER_UNSPECIFIED\020\000\022\r\n"
+ "\tASCENDING\020\001\022\016\n\n"
@@ -102,8 +147,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\013ArrayConfig\022\034\n"
+ "\030ARRAY_CONFIG_UNSPECIFIED\020\000\022\014\n"
+ "\010CONTAINS\020\001B\014\n\n"
- + "value_mode\"i\n"
- + "\n"
+ + "value_mode\032`\n"
+ + "\022SearchIndexOptions\022\032\n\r"
+ + "text_language\030\001 \001(\tB\003\340A\001\022.\n"
+ + "!text_language_override_field_path\030\002 \001(\tB\003\340A\001\"i\n\n"
+ "QueryScope\022\033\n"
+ "\027QUERY_SCOPE_UNSPECIFIED\020\000\022\016\n\n"
+ "COLLECTION\020\001\022\024\n"
@@ -123,13 +170,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "SPARSE_ALL\020\001\022\016\n\n"
+ "SPARSE_ANY\020\002\022\t\n"
+ "\005DENSE\020\003:z\352Aw\n"
- + "\036firestore.googleapis.com/Index\022Uprojects/{project}/databas"
- + "es/{database}/collectionGroups/{collection}/indexes/{index}B\331\001\n"
+ + "\036firestore.googleapis.com/Index\022Uprojects/{proje"
+ + "ct}/databases/{database}/collectionGroups/{collection}/indexes/{index}B\331\001\n"
+ "\035com.google.firestore.admin.v1B\n"
- + "IndexProtoP\001Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;a"
- + "dminpb\242\002\004GCFS\252\002\037Google.Cloud.Firestore.A"
- + "dmin.V1\312\002\037Google\\Cloud\\Firestore\\Admin\\V"
- + "1\352\002#Google::Cloud::Firestore::Admin::V1b\006proto3"
+ + "IndexProtoP\001Z9cloud.google.com/go/firestore/apiv1/admi"
+ + "n/adminpb;adminpb\242\002\004GCFS\252\002\037Google.Cloud."
+ + "Firestore.Admin.V1\312\002\037Google\\Cloud\\Firest"
+ + "ore\\Admin\\V1\352\002#Google::Cloud::Firestore::Admin::V1b\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -152,6 +199,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"Multikey",
"ShardCount",
"Unique",
+ "SearchIndexOptions",
});
internal_static_google_firestore_admin_v1_Index_IndexField_descriptor =
internal_static_google_firestore_admin_v1_Index_descriptor.getNestedType(0);
@@ -159,7 +207,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_google_firestore_admin_v1_Index_IndexField_descriptor,
new java.lang.String[] {
- "FieldPath", "Order", "ArrayConfig", "VectorConfig", "ValueMode",
+ "FieldPath", "Order", "ArrayConfig", "VectorConfig", "SearchConfig", "ValueMode",
});
internal_static_google_firestore_admin_v1_Index_IndexField_VectorConfig_descriptor =
internal_static_google_firestore_admin_v1_Index_IndexField_descriptor.getNestedType(0);
@@ -176,6 +224,49 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_google_firestore_admin_v1_Index_IndexField_VectorConfig_FlatIndex_descriptor,
new java.lang.String[] {});
+ internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_descriptor =
+ internal_static_google_firestore_admin_v1_Index_IndexField_descriptor.getNestedType(1);
+ internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_descriptor,
+ new java.lang.String[] {
+ "TextSpec", "GeoSpec",
+ });
+ internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_SearchTextIndexSpec_descriptor =
+ internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_descriptor
+ .getNestedType(0);
+ internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_SearchTextIndexSpec_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_SearchTextIndexSpec_descriptor,
+ new java.lang.String[] {
+ "IndexType", "MatchType",
+ });
+ internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_SearchTextSpec_descriptor =
+ internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_descriptor
+ .getNestedType(1);
+ internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_SearchTextSpec_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_SearchTextSpec_descriptor,
+ new java.lang.String[] {
+ "IndexSpecs",
+ });
+ internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_SearchGeoSpec_descriptor =
+ internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_descriptor
+ .getNestedType(2);
+ internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_SearchGeoSpec_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_google_firestore_admin_v1_Index_IndexField_SearchConfig_SearchGeoSpec_descriptor,
+ new java.lang.String[] {
+ "GeoJsonIndexingDisabled",
+ });
+ internal_static_google_firestore_admin_v1_Index_SearchIndexOptions_descriptor =
+ internal_static_google_firestore_admin_v1_Index_descriptor.getNestedType(1);
+ internal_static_google_firestore_admin_v1_Index_SearchIndexOptions_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_google_firestore_admin_v1_Index_SearchIndexOptions_descriptor,
+ new java.lang.String[] {
+ "TextLanguage", "TextLanguageOverrideFieldPath",
+ });
descriptor.resolveAllFeaturesImmutable();
com.google.api.FieldBehaviorProto.getDescriptor();
com.google.api.ResourceProto.getDescriptor();
diff --git a/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/backup.proto b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/backup.proto
index 613eb1184b..f4ff835d0d 100644
--- a/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/backup.proto
+++ b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/backup.proto
@@ -71,6 +71,11 @@ message Backup {
// Output only. The unique resource name of the Backup.
//
// Format is `projects/{project}/locations/{location}/backups/{backup}`.
+ //
+ // The location in the name will be the Standard Managed Multi-Region (SMMR)
+ // location (e.g. `us`) if the backup was created with an SMMR location, or
+ // the Google Managed Multi-Region (GMMR) location (e.g. `nam5`) if the backup
+ // was created with a GMMR location.
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Name of the Firestore database that the backup is from.
diff --git a/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/index.proto b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/index.proto
index d98753ce49..c3f20c5bc2 100644
--- a/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/index.proto
+++ b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/index.proto
@@ -115,6 +115,64 @@ message Index {
}
}
+ // The configuration for how to index a field for search.
+ message SearchConfig {
+ // Ways to index the text field value.
+ enum TextIndexType {
+ // The index type is unspecified. Not a valid option.
+ TEXT_INDEX_TYPE_UNSPECIFIED = 0;
+
+ // Field values are tokenized. This is the only way currently supported
+ // for MONGODB_COMPATIBLE_API.
+ TOKENIZED = 1;
+ }
+
+ // Types of text matches that are supported for the
+ // field.
+ enum TextMatchType {
+ // The match type is unspecified. Not a valid option.
+ TEXT_MATCH_TYPE_UNSPECIFIED = 0;
+
+ // Match on any indexed field. This is the only way currently supported
+ // for MONGODB_COMPATIBLE_API.
+ MATCH_GLOBALLY = 1;
+ }
+
+ // Specification of how the field should be indexed for search text
+ // indexes.
+ message SearchTextIndexSpec {
+ // Required. How to index the text field value.
+ TextIndexType index_type = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // Required. How to match the text field value.
+ TextMatchType match_type = 2 [(google.api.field_behavior) = REQUIRED];
+ }
+
+ // The specification for how to build a text search index for a field.
+ message SearchTextSpec {
+ // Required. Specifications for how the field should be indexed.
+ // Repeated so that the field can be indexed in multiple ways.
+ repeated SearchTextIndexSpec index_specs = 1
+ [(google.api.field_behavior) = REQUIRED];
+ }
+
+ // The specification for how to build a geo search index for a field.
+ message SearchGeoSpec {
+ // Optional. Disables geoJSON indexing for the field. By default,
+ // geoJSON points are indexed.
+ bool geo_json_indexing_disabled = 1
+ [(google.api.field_behavior) = OPTIONAL];
+ }
+
+ // Optional. The specification for building a text search index for a
+ // field.
+ SearchTextSpec text_spec = 1 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. The specification for building a geo search index for a
+ // field.
+ SearchGeoSpec geo_spec = 2 [(google.api.field_behavior) = OPTIONAL];
+ }
+
// Can be __name__.
// For single field indexes, this must match the name of the field or may
// be omitted.
@@ -132,6 +190,11 @@ message Index {
// Indicates that this field supports nearest neighbor and distance
// operations on vector.
VectorConfig vector_config = 4;
+
+ // Indicates that this field supports search operations. This field
+ // is only currently supported for indexes with MONGODB_COMPATIBLE_API
+ // ApiScope.
+ SearchConfig search_config = 5;
}
}
@@ -233,6 +296,26 @@ message Index {
DENSE = 3;
}
+ // Options for search indexes at the definition level.
+ message SearchIndexOptions {
+ // Optional. The language to use for text search indexes. Used as the
+ // default language if not overridden at the document level by specifying
+ // the `text_language_override_field`. The language is specified as a BCP 47
+ // language code.
+ // For indexes with MONGODB_COMPATIBLE_API ApiScope: If unspecified, the
+ // default language is English.
+ // For indexes with `ANY_API` ApiScope: If unspecified, the default behavior
+ // is autodetect.
+ string text_language = 1 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. The field in the document that specifies which language to use
+ // for that specific document. For indexes with MONGODB_COMPATIBLE_API
+ // ApiScope: if unspecified, the language is taken from the "language" field
+ // if it exists or from `text_language` if it does not.
+ string text_language_override_field_path = 2
+ [(google.api.field_behavior) = OPTIONAL];
+ }
+
// Output only. A server defined name for this index.
// The form of this name for composite indexes will be:
// `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}`
@@ -286,4 +369,10 @@ message Index {
// Optional. Whether it is an unique index. Unique index ensures all values
// for the indexed field(s) are unique across documents.
bool unique = 10 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. Options for search indexes that are at the index definition
+ // level. This field is only currently supported for indexes with
+ // MONGODB_COMPATIBLE_API ApiScope.
+ SearchIndexOptions search_index_options = 9
+ [(google.api.field_behavior) = OPTIONAL];
}
diff --git a/proto-google-cloud-firestore-bundle-v1/pom.xml b/proto-google-cloud-firestore-bundle-v1/pom.xml
index 9896aa87ee..7feb46cbb0 100644
--- a/proto-google-cloud-firestore-bundle-v1/pom.xml
+++ b/proto-google-cloud-firestore-bundle-v1/pom.xml
@@ -5,14 +5,14 @@
4.0.0
proto-google-cloud-firestore-bundle-v1
- 3.41.0
+ 3.42.0
proto-google-cloud-firestore-bundle-v1
PROTO library for proto-google-cloud-firestore-bundle-v1
com.google.cloud
google-cloud-firestore-parent
- 3.41.0
+ 3.42.0
diff --git a/proto-google-cloud-firestore-v1/pom.xml b/proto-google-cloud-firestore-v1/pom.xml
index 5805945c89..e341365e53 100644
--- a/proto-google-cloud-firestore-v1/pom.xml
+++ b/proto-google-cloud-firestore-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
proto-google-cloud-firestore-v1
- 3.41.0
+ 3.42.0
proto-google-cloud-firestore-v1
PROTO library for proto-google-cloud-firestore-v1
com.google.cloud
google-cloud-firestore-parent
- 3.41.0
+ 3.42.0
diff --git a/renovate.json b/renovate.json
index a4117f5d7a..5adbee08ae 100644
--- a/renovate.json
+++ b/renovate.json
@@ -26,8 +26,8 @@
"fileMatch": [
"^.github/workflows/unmanaged-dependency-check.yaml$"
],
- "matchStrings": ["uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v(?.+?)\\n"],
- "depNameTemplate": "com.google.cloud:sdk-platform-java-config",
+ "matchStrings": ["uses: googleapis/google-cloud-java/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@v(?.+?)\\n"],
+ "depNameTemplate": "com.google.cloud:gapic-libraries-bom",
"datasourceTemplate": "maven"
}
],
diff --git a/versions.txt b/versions.txt
index 16f6132833..4d8a28473d 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,11 +1,11 @@
# Format:
# module:released-version:current-version
-google-cloud-firestore:3.41.0:3.41.0
-google-cloud-firestore-admin:3.41.0:3.41.0
-google-cloud-firestore-bom:3.41.0:3.41.0
-grpc-google-cloud-firestore-admin-v1:3.41.0:3.41.0
-grpc-google-cloud-firestore-v1:3.41.0:3.41.0
-proto-google-cloud-firestore-admin-v1:3.41.0:3.41.0
-proto-google-cloud-firestore-v1:3.41.0:3.41.0
-proto-google-cloud-firestore-bundle-v1:3.41.0:3.41.0
+google-cloud-firestore:3.42.0:3.42.0
+google-cloud-firestore-admin:3.42.0:3.42.0
+google-cloud-firestore-bom:3.42.0:3.42.0
+grpc-google-cloud-firestore-admin-v1:3.42.0:3.42.0
+grpc-google-cloud-firestore-v1:3.42.0:3.42.0
+proto-google-cloud-firestore-admin-v1:3.42.0:3.42.0
+proto-google-cloud-firestore-v1:3.42.0:3.42.0
+proto-google-cloud-firestore-bundle-v1:3.42.0:3.42.0