Skip to content

Commit c65cef0

Browse files
feat: Protos and autogen client for vector (#2027)
* feat: add VectorSearch API PiperOrigin-RevId: 617982192 Source-Link: googleapis/googleapis@5e2ca44 Source-Link: googleapis/googleapis-gen@37fe0b1 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzdmZTBiMTU5Y2Y5NjExZWNiY2Q0ZjA4OTg1ZDVlMGI1NmJiMGE0YyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add Vector Index API PiperOrigin-RevId: 618867415 Source-Link: googleapis/googleapis@277145d Source-Link: googleapis/googleapis-gen@adcd307 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWRjZDMwNzY3ODRiNWFlNGU1M2E3YjliZTE1ZDc3MjBjMmMwN2RlNyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 319adc3 commit c65cef0

11 files changed

+804
-10
lines changed

dev/protos/admin_v1.json

+37-1
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,8 @@
349349
"valueMode": {
350350
"oneof": [
351351
"order",
352-
"arrayConfig"
352+
"arrayConfig",
353+
"vectorConfig"
353354
]
354355
}
355356
},
@@ -365,6 +366,10 @@
365366
"arrayConfig": {
366367
"type": "ArrayConfig",
367368
"id": 3
369+
},
370+
"vectorConfig": {
371+
"type": "VectorConfig",
372+
"id": 4
368373
}
369374
},
370375
"nested": {
@@ -380,6 +385,33 @@
380385
"ARRAY_CONFIG_UNSPECIFIED": 0,
381386
"CONTAINS": 1
382387
}
388+
},
389+
"VectorConfig": {
390+
"oneofs": {
391+
"type": {
392+
"oneof": [
393+
"flat"
394+
]
395+
}
396+
},
397+
"fields": {
398+
"dimension": {
399+
"type": "int32",
400+
"id": 1,
401+
"options": {
402+
"(google.api.field_behavior)": "REQUIRED"
403+
}
404+
},
405+
"flat": {
406+
"type": "FlatIndex",
407+
"id": 2
408+
}
409+
},
410+
"nested": {
411+
"FlatIndex": {
412+
"fields": {}
413+
}
414+
}
383415
}
384416
}
385417
},
@@ -3283,6 +3315,10 @@
32833315
1002,
32843316
1002
32853317
],
3318+
[
3319+
9990,
3320+
9990
3321+
],
32863322
[
32873323
9995,
32883324
9999

dev/protos/firestore_admin_v1_proto_api.d.ts

+109-1
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,9 @@ export namespace google {
605605

606606
/** IndexField arrayConfig */
607607
arrayConfig?: (google.firestore.admin.v1.Index.IndexField.ArrayConfig|null);
608+
609+
/** IndexField vectorConfig */
610+
vectorConfig?: (google.firestore.admin.v1.Index.IndexField.IVectorConfig|null);
608611
}
609612

610613
/** Represents an IndexField. */
@@ -625,8 +628,11 @@ export namespace google {
625628
/** IndexField arrayConfig. */
626629
public arrayConfig?: (google.firestore.admin.v1.Index.IndexField.ArrayConfig|null);
627630

631+
/** IndexField vectorConfig. */
632+
public vectorConfig?: (google.firestore.admin.v1.Index.IndexField.IVectorConfig|null);
633+
628634
/** IndexField valueMode. */
629-
public valueMode?: ("order"|"arrayConfig");
635+
public valueMode?: ("order"|"arrayConfig"|"vectorConfig");
630636

631637
/**
632638
* Creates an IndexField message from a plain object. Also converts values to their respective internal types.
@@ -666,6 +672,108 @@ export namespace google {
666672
/** ArrayConfig enum. */
667673
type ArrayConfig =
668674
"ARRAY_CONFIG_UNSPECIFIED"| "CONTAINS";
675+
676+
/** Properties of a VectorConfig. */
677+
interface IVectorConfig {
678+
679+
/** VectorConfig dimension */
680+
dimension?: (number|null);
681+
682+
/** VectorConfig flat */
683+
flat?: (google.firestore.admin.v1.Index.IndexField.VectorConfig.IFlatIndex|null);
684+
}
685+
686+
/** Represents a VectorConfig. */
687+
class VectorConfig implements IVectorConfig {
688+
689+
/**
690+
* Constructs a new VectorConfig.
691+
* @param [properties] Properties to set
692+
*/
693+
constructor(properties?: google.firestore.admin.v1.Index.IndexField.IVectorConfig);
694+
695+
/** VectorConfig dimension. */
696+
public dimension: number;
697+
698+
/** VectorConfig flat. */
699+
public flat?: (google.firestore.admin.v1.Index.IndexField.VectorConfig.IFlatIndex|null);
700+
701+
/** VectorConfig type. */
702+
public type?: "flat";
703+
704+
/**
705+
* Creates a VectorConfig message from a plain object. Also converts values to their respective internal types.
706+
* @param object Plain object
707+
* @returns VectorConfig
708+
*/
709+
public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Index.IndexField.VectorConfig;
710+
711+
/**
712+
* Creates a plain object from a VectorConfig message. Also converts values to other types if specified.
713+
* @param message VectorConfig
714+
* @param [options] Conversion options
715+
* @returns Plain object
716+
*/
717+
public static toObject(message: google.firestore.admin.v1.Index.IndexField.VectorConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
718+
719+
/**
720+
* Converts this VectorConfig to JSON.
721+
* @returns JSON object
722+
*/
723+
public toJSON(): { [k: string]: any };
724+
725+
/**
726+
* Gets the default type url for VectorConfig
727+
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
728+
* @returns The default type url
729+
*/
730+
public static getTypeUrl(typeUrlPrefix?: string): string;
731+
}
732+
733+
namespace VectorConfig {
734+
735+
/** Properties of a FlatIndex. */
736+
interface IFlatIndex {
737+
}
738+
739+
/** Represents a FlatIndex. */
740+
class FlatIndex implements IFlatIndex {
741+
742+
/**
743+
* Constructs a new FlatIndex.
744+
* @param [properties] Properties to set
745+
*/
746+
constructor(properties?: google.firestore.admin.v1.Index.IndexField.VectorConfig.IFlatIndex);
747+
748+
/**
749+
* Creates a FlatIndex message from a plain object. Also converts values to their respective internal types.
750+
* @param object Plain object
751+
* @returns FlatIndex
752+
*/
753+
public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex;
754+
755+
/**
756+
* Creates a plain object from a FlatIndex message. Also converts values to other types if specified.
757+
* @param message FlatIndex
758+
* @param [options] Conversion options
759+
* @returns Plain object
760+
*/
761+
public static toObject(message: google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex, options?: $protobuf.IConversionOptions): { [k: string]: any };
762+
763+
/**
764+
* Converts this FlatIndex to JSON.
765+
* @returns JSON object
766+
*/
767+
public toJSON(): { [k: string]: any };
768+
769+
/**
770+
* Gets the default type url for FlatIndex
771+
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
772+
* @returns The default type url
773+
*/
774+
public static getTypeUrl(typeUrlPrefix?: string): string;
775+
}
776+
}
669777
}
670778

671779
/** State enum. */

0 commit comments

Comments
 (0)