Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Protos and autogen client for Vector Index #2027

Merged
merged 4 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 37 additions & 1 deletion dev/protos/admin_v1.json
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading
Loading