Skip to content

Commit

Permalink
feat: Protos and autogen client for vector (#2027)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Mar 25, 2024
1 parent 319adc3 commit c65cef0
Show file tree
Hide file tree
Showing 11 changed files with 804 additions and 10 deletions.
38 changes: 37 additions & 1 deletion dev/protos/admin_v1.json
Expand Up @@ -349,7 +349,8 @@
"valueMode": {
"oneof": [
"order",
"arrayConfig"
"arrayConfig",
"vectorConfig"
]
}
},
Expand All @@ -365,6 +366,10 @@
"arrayConfig": {
"type": "ArrayConfig",
"id": 3
},
"vectorConfig": {
"type": "VectorConfig",
"id": 4
}
},
"nested": {
Expand All @@ -380,6 +385,33 @@
"ARRAY_CONFIG_UNSPECIFIED": 0,
"CONTAINS": 1
}
},
"VectorConfig": {
"oneofs": {
"type": {
"oneof": [
"flat"
]
}
},
"fields": {
"dimension": {
"type": "int32",
"id": 1,
"options": {
"(google.api.field_behavior)": "REQUIRED"
}
},
"flat": {
"type": "FlatIndex",
"id": 2
}
},
"nested": {
"FlatIndex": {
"fields": {}
}
}
}
}
},
Expand Down Expand Up @@ -3283,6 +3315,10 @@
1002,
1002
],
[
9990,
9990
],
[
9995,
9999
Expand Down
110 changes: 109 additions & 1 deletion dev/protos/firestore_admin_v1_proto_api.d.ts
Expand Up @@ -605,6 +605,9 @@ export namespace google {

/** IndexField arrayConfig */
arrayConfig?: (google.firestore.admin.v1.Index.IndexField.ArrayConfig|null);

/** IndexField vectorConfig */
vectorConfig?: (google.firestore.admin.v1.Index.IndexField.IVectorConfig|null);
}

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

/** IndexField vectorConfig. */
public vectorConfig?: (google.firestore.admin.v1.Index.IndexField.IVectorConfig|null);

/** IndexField valueMode. */
public valueMode?: ("order"|"arrayConfig");
public valueMode?: ("order"|"arrayConfig"|"vectorConfig");

/**
* Creates an IndexField message from a plain object. Also converts values to their respective internal types.
Expand Down Expand Up @@ -666,6 +672,108 @@ export namespace google {
/** ArrayConfig enum. */
type ArrayConfig =
"ARRAY_CONFIG_UNSPECIFIED"| "CONTAINS";

/** Properties of a VectorConfig. */
interface IVectorConfig {

/** VectorConfig dimension */
dimension?: (number|null);

/** VectorConfig flat */
flat?: (google.firestore.admin.v1.Index.IndexField.VectorConfig.IFlatIndex|null);
}

/** Represents a VectorConfig. */
class VectorConfig implements IVectorConfig {

/**
* Constructs a new VectorConfig.
* @param [properties] Properties to set
*/
constructor(properties?: google.firestore.admin.v1.Index.IndexField.IVectorConfig);

/** VectorConfig dimension. */
public dimension: number;

/** VectorConfig flat. */
public flat?: (google.firestore.admin.v1.Index.IndexField.VectorConfig.IFlatIndex|null);

/** VectorConfig type. */
public type?: "flat";

/**
* Creates a VectorConfig message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns VectorConfig
*/
public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Index.IndexField.VectorConfig;

/**
* Creates a plain object from a VectorConfig message. Also converts values to other types if specified.
* @param message VectorConfig
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.firestore.admin.v1.Index.IndexField.VectorConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };

/**
* Converts this VectorConfig to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };

/**
* Gets the default type url for VectorConfig
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}

namespace VectorConfig {

/** Properties of a FlatIndex. */
interface IFlatIndex {
}

/** Represents a FlatIndex. */
class FlatIndex implements IFlatIndex {

/**
* Constructs a new FlatIndex.
* @param [properties] Properties to set
*/
constructor(properties?: google.firestore.admin.v1.Index.IndexField.VectorConfig.IFlatIndex);

/**
* Creates a FlatIndex message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns FlatIndex
*/
public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex;

/**
* Creates a plain object from a FlatIndex message. Also converts values to other types if specified.
* @param message FlatIndex
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex, options?: $protobuf.IConversionOptions): { [k: string]: any };

/**
* Converts this FlatIndex to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };

/**
* Gets the default type url for FlatIndex
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
}
}

/** State enum. */
Expand Down

0 comments on commit c65cef0

Please sign in to comment.