From b6c0214ce4c8f947acda72a1f9558afe33a892b5 Mon Sep 17 00:00:00 2001 From: Austin DeNoble Date: Sat, 14 Sep 2024 00:12:36 -0400 Subject: [PATCH 1/4] refactor codegen/build-clients.sh script to support the newer structure for the upcoming API version, specifically inference is its own module, and db_control/db_data split control and data plane, rename and update exports and imports --- codegen/apis | 2 +- codegen/build-clients.sh | 71 +- internal/gen/api_version.go | 2 +- internal/gen/control/control_plane.oas.go | 204 +- ...ta_2024-07.pb.go => db_data_2024-10.pb.go} | 732 +++---- ..._grpc.pb.go => db_data_2024-10_grpc.pb.go} | 4 +- internal/gen/db_control/control_plane.oas.go | 1857 +++++++++++++++++ .../gen/inference/2024-10_inference.oas.go | 611 ++++++ internal/provider/header.go | 8 +- justfile | 2 +- pinecone/client.go | 125 +- pinecone/client_test.go | 72 +- 12 files changed, 3008 insertions(+), 682 deletions(-) rename internal/gen/data/{data_2024-07.pb.go => db_data_2024-10.pb.go} (64%) rename internal/gen/data/{data_2024-07_grpc.pb.go => db_data_2024-10_grpc.pb.go} (99%) create mode 100644 internal/gen/db_control/control_plane.oas.go create mode 100644 internal/gen/inference/2024-10_inference.oas.go diff --git a/codegen/apis b/codegen/apis index 062b114..d1d005e 160000 --- a/codegen/apis +++ b/codegen/apis @@ -1 +1 @@ -Subproject commit 062b114b6d7b016de2b4d2b68c211a81b8689d1a +Subproject commit d1d005e75cc9fe9a5c486ef9218fe87b57765961 diff --git a/codegen/build-clients.sh b/codegen/build-clients.sh index 0a4bfd2..223b3a1 100755 --- a/codegen/build-clients.sh +++ b/codegen/build-clients.sh @@ -1,14 +1,26 @@ #!/bin/bash -set -eux -o pipefail - version=$1 # e.g. 2024-07 -# data_destination must align with the option go_package: -# https://github.com/pinecone-io/apis/blob/e9b47c76f649656002f4911946ca6c4c4a6f04fc/src/release/data/data.proto#L3 -data_destination="internal/gen/data" -control_destination="internal/gen/control" +# modules +db_control_module="db_control" +db_data_module="db_data" +inference_module="inference" + +# generated output destination paths +# db_data_destination must align with the option go_package in the proto file: +# https://github.com/pinecone-io/apis/blob/d1d005e75cc9fe9a5c486ef9218fe87b57765961/src/release/db/data/data.proto#L3 +db_data_destination="internal/gen/data" +db_control_destination="internal/gen/${db_control_module}" +inference_destination="internal/gen/${inference_module}" + +# version file version_file="internal/gen/api_version.go" +# generated oas files +db_control_oas_file="${db_control_destination}/control_plane.oas.go" +inference_oas_file="${inference_destination}/${version}_${inference_module}.oas.go" + +set -eux -o pipefail update_apis_repo() { echo "Updating apis repo" @@ -27,18 +39,35 @@ verify_spec_version() { echo "Version is required" exit 1 fi + + verify_directory_exists "codegen/apis/_build/${version}" +} + +verify_directory_exists() { + local directory=$1 + if [ ! -d "$directory" ]; then + echo "Directory does not exist at $directory" + exit 1 + fi } generate_oas_client() { - oas_file="codegen/apis/_build/${version}/control_${version}.oas.yaml" + local module=$1 + local destination=$2 + + # source oas file for module and version + oas_file="codegen/apis/_build/${version}/${module}_${version}.oas.yaml" - oapi-codegen --package=control \ + oapi-codegen --package=${module} \ --generate types,client \ - "${oas_file}" > "${control_destination}/control_plane.oas.go" + "${oas_file}" > "${destination}" } generate_proto_client() { - proto_file="codegen/apis/_build/${version}/data_${version}.proto" + local module=$1 + + # source proto file for module and version + proto_file="codegen/apis/_build/${version}/${module}_${version}.proto" protoc --experimental_allow_proto3_optional \ --proto_path=codegen/apis/vendor/protos \ @@ -63,19 +92,21 @@ EOL update_apis_repo verify_spec_version $version -# Generate control plane client code -rm -rf "${control_destination}" -mkdir -p "${control_destination}" - -generate_oas_client +# Generate db_control oas client +rm -rf "${db_control_destination}" +mkdir -p "${db_control_destination}" +generate_oas_client $db_control_module $db_control_oas_file -# Generate data plane client code -rm -rf "${data_destination}" -mkdir -p "${data_destination}" +# Generate inference oas client +rm -rf "${inference_destination}" +mkdir -p "${inference_destination}" +generate_oas_client $inference_module $inference_oas_file -generate_proto_client +# Generate db_data proto client +rm -rf "${db_data_destination}" +mkdir -p "${db_data_destination}" +generate_proto_client $db_data_module # Generate version file rm -rf "${version_file}" - generate_version_file \ No newline at end of file diff --git a/internal/gen/api_version.go b/internal/gen/api_version.go index e971954..45dce50 100644 --- a/internal/gen/api_version.go +++ b/internal/gen/api_version.go @@ -1,4 +1,4 @@ // Code generated by build-clients.sh - DO NOT EDIT. package gen -const PineconeApiVersion = "2024-07" +const PineconeApiVersion = "2024-10" diff --git a/internal/gen/control/control_plane.oas.go b/internal/gen/control/control_plane.oas.go index c8bdb49..5088e89 100644 --- a/internal/gen/control/control_plane.oas.go +++ b/internal/gen/control/control_plane.oas.go @@ -1,7 +1,7 @@ -// Package control provides primitives to interact with the openapi HTTP API. +// Package db_control provides primitives to interact with the openapi HTTP API. // // Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT. -package control +package db_control import ( "bytes" @@ -168,40 +168,6 @@ type CreateIndexRequestMetric string // DeletionProtection Whether [deletion protection](http://docs.pinecone.io/guides/indexes/prevent-index-deletion) is enabled/disabled for the index. type DeletionProtection string -// EmbedRequest Generate embeddings for inputs -type EmbedRequest struct { - Inputs []struct { - Text *string `json:"text,omitempty"` - } `json:"inputs"` - Model string `json:"model"` - - // Parameters Model-specific parameters. - Parameters *struct { - // InputType Common property used to distinguish between types of data. - InputType *string `json:"input_type,omitempty"` - - // Truncate How to handle inputs longer than those supported by the model. If NONE, when the input exceeds the maximum input token length an error will be returned. - Truncate *string `json:"truncate,omitempty"` - } `json:"parameters,omitempty"` -} - -// Embedding Embedding of a single input -type Embedding struct { - // Values The embedding values. - Values *[]float32 `json:"values,omitempty"` -} - -// EmbeddingsList Embeddings generated for the input -type EmbeddingsList struct { - Data *[]Embedding `json:"data,omitempty"` - Model *string `json:"model,omitempty"` - - // Usage Usage statistics for model inference including any instruction prefixes - Usage *struct { - TotalTokens *int `json:"total_tokens,omitempty"` - } `json:"usage,omitempty"` -} - // ErrorResponse The response shape used for all error responses. type ErrorResponse struct { // Error Detailed information about the error that occurred. @@ -320,9 +286,6 @@ type ServerlessSpecCloud string // CreateCollectionJSONRequestBody defines body for CreateCollection for application/json ContentType. type CreateCollectionJSONRequestBody = CreateCollectionRequest -// EmbedJSONRequestBody defines body for Embed for application/json ContentType. -type EmbedJSONRequestBody = EmbedRequest - // CreateIndexJSONRequestBody defines body for CreateIndex for application/json ContentType. type CreateIndexJSONRequestBody = CreateIndexRequest @@ -526,11 +489,6 @@ type ClientInterface interface { // DescribeCollection request DescribeCollection(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*http.Response, error) - // EmbedWithBody request with any body - EmbedWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - Embed(ctx context.Context, body EmbedJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // ListIndexes request ListIndexes(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -611,30 +569,6 @@ func (c *Client) DescribeCollection(ctx context.Context, collectionName string, return c.Client.Do(req) } -func (c *Client) EmbedWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewEmbedRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) Embed(ctx context.Context, body EmbedJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewEmbedRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - func (c *Client) ListIndexes(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListIndexesRequest(c.Server) if err != nil { @@ -854,46 +788,6 @@ func NewDescribeCollectionRequest(server string, collectionName string) (*http.R return req, nil } -// NewEmbedRequest calls the generic Embed builder with application/json body -func NewEmbedRequest(server string, body EmbedJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewEmbedRequestWithBody(server, "application/json", bodyReader) -} - -// NewEmbedRequestWithBody generates requests for Embed with any type of body -func NewEmbedRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/embed") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - // NewListIndexesRequest generates requests for ListIndexes func NewListIndexesRequest(server string) (*http.Request, error) { var err error @@ -1133,11 +1027,6 @@ type ClientWithResponsesInterface interface { // DescribeCollectionWithResponse request DescribeCollectionWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*DescribeCollectionResponse, error) - // EmbedWithBodyWithResponse request with any body - EmbedWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmbedResponse, error) - - EmbedWithResponse(ctx context.Context, body EmbedJSONRequestBody, reqEditors ...RequestEditorFn) (*EmbedResponse, error) - // ListIndexesWithResponse request ListIndexesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListIndexesResponse, error) @@ -1259,31 +1148,6 @@ func (r DescribeCollectionResponse) StatusCode() int { return 0 } -type EmbedResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *EmbeddingsList - JSON400 *ErrorResponse - JSON401 *ErrorResponse - JSON500 *ErrorResponse -} - -// Status returns HTTPResponse.Status -func (r EmbedResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r EmbedResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - type ListIndexesResponse struct { Body []byte HTTPResponse *http.Response @@ -1459,23 +1323,6 @@ func (c *ClientWithResponses) DescribeCollectionWithResponse(ctx context.Context return ParseDescribeCollectionResponse(rsp) } -// EmbedWithBodyWithResponse request with arbitrary body returning *EmbedResponse -func (c *ClientWithResponses) EmbedWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmbedResponse, error) { - rsp, err := c.EmbedWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseEmbedResponse(rsp) -} - -func (c *ClientWithResponses) EmbedWithResponse(ctx context.Context, body EmbedJSONRequestBody, reqEditors ...RequestEditorFn) (*EmbedResponse, error) { - rsp, err := c.Embed(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseEmbedResponse(rsp) -} - // ListIndexesWithResponse request returning *ListIndexesResponse func (c *ClientWithResponses) ListIndexesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListIndexesResponse, error) { rsp, err := c.ListIndexes(ctx, reqEditors...) @@ -1732,53 +1579,6 @@ func ParseDescribeCollectionResponse(rsp *http.Response) (*DescribeCollectionRes return response, nil } -// ParseEmbedResponse parses an HTTP response from a EmbedWithResponse call -func ParseEmbedResponse(rsp *http.Response) (*EmbedResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &EmbedResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest EmbeddingsList - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest ErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest ErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest ErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - // ParseListIndexesResponse parses an HTTP response from a ListIndexesWithResponse call func ParseListIndexesResponse(rsp *http.Response) (*ListIndexesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/internal/gen/data/data_2024-07.pb.go b/internal/gen/data/db_data_2024-10.pb.go similarity index 64% rename from internal/gen/data/data_2024-07.pb.go rename to internal/gen/data/db_data_2024-10.pb.go index f7bdca4..04960b8 100644 --- a/internal/gen/data/data_2024-07.pb.go +++ b/internal/gen/data/db_data_2024-10.pb.go @@ -2,7 +2,7 @@ // versions: // protoc-gen-go v1.32.0 // protoc v5.27.1 -// source: data_2024-07.proto +// source: db_data_2024-10.proto package data @@ -34,7 +34,7 @@ type SparseValues struct { func (x *SparseValues) Reset() { *x = SparseValues{} if protoimpl.UnsafeEnabled { - mi := &file_data_2024_07_proto_msgTypes[0] + mi := &file_db_data_2024_10_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -47,7 +47,7 @@ func (x *SparseValues) String() string { func (*SparseValues) ProtoMessage() {} func (x *SparseValues) ProtoReflect() protoreflect.Message { - mi := &file_data_2024_07_proto_msgTypes[0] + mi := &file_db_data_2024_10_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -60,7 +60,7 @@ func (x *SparseValues) ProtoReflect() protoreflect.Message { // Deprecated: Use SparseValues.ProtoReflect.Descriptor instead. func (*SparseValues) Descriptor() ([]byte, []int) { - return file_data_2024_07_proto_rawDescGZIP(), []int{0} + return file_db_data_2024_10_proto_rawDescGZIP(), []int{0} } func (x *SparseValues) GetIndices() []uint32 { @@ -94,7 +94,7 @@ type Vector struct { func (x *Vector) Reset() { *x = Vector{} if protoimpl.UnsafeEnabled { - mi := &file_data_2024_07_proto_msgTypes[1] + mi := &file_db_data_2024_10_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -107,7 +107,7 @@ func (x *Vector) String() string { func (*Vector) ProtoMessage() {} func (x *Vector) ProtoReflect() protoreflect.Message { - mi := &file_data_2024_07_proto_msgTypes[1] + mi := &file_db_data_2024_10_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -120,7 +120,7 @@ func (x *Vector) ProtoReflect() protoreflect.Message { // Deprecated: Use Vector.ProtoReflect.Descriptor instead. func (*Vector) Descriptor() ([]byte, []int) { - return file_data_2024_07_proto_rawDescGZIP(), []int{1} + return file_db_data_2024_10_proto_rawDescGZIP(), []int{1} } func (x *Vector) GetId() string { @@ -171,7 +171,7 @@ type ScoredVector struct { func (x *ScoredVector) Reset() { *x = ScoredVector{} if protoimpl.UnsafeEnabled { - mi := &file_data_2024_07_proto_msgTypes[2] + mi := &file_db_data_2024_10_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -184,7 +184,7 @@ func (x *ScoredVector) String() string { func (*ScoredVector) ProtoMessage() {} func (x *ScoredVector) ProtoReflect() protoreflect.Message { - mi := &file_data_2024_07_proto_msgTypes[2] + mi := &file_db_data_2024_10_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -197,7 +197,7 @@ func (x *ScoredVector) ProtoReflect() protoreflect.Message { // Deprecated: Use ScoredVector.ProtoReflect.Descriptor instead. func (*ScoredVector) Descriptor() ([]byte, []int) { - return file_data_2024_07_proto_rawDescGZIP(), []int{2} + return file_db_data_2024_10_proto_rawDescGZIP(), []int{2} } func (x *ScoredVector) GetId() string { @@ -253,7 +253,7 @@ type RequestUnion struct { func (x *RequestUnion) Reset() { *x = RequestUnion{} if protoimpl.UnsafeEnabled { - mi := &file_data_2024_07_proto_msgTypes[3] + mi := &file_db_data_2024_10_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -266,7 +266,7 @@ func (x *RequestUnion) String() string { func (*RequestUnion) ProtoMessage() {} func (x *RequestUnion) ProtoReflect() protoreflect.Message { - mi := &file_data_2024_07_proto_msgTypes[3] + mi := &file_db_data_2024_10_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -279,7 +279,7 @@ func (x *RequestUnion) ProtoReflect() protoreflect.Message { // Deprecated: Use RequestUnion.ProtoReflect.Descriptor instead. func (*RequestUnion) Descriptor() ([]byte, []int) { - return file_data_2024_07_proto_rawDescGZIP(), []int{3} + return file_db_data_2024_10_proto_rawDescGZIP(), []int{3} } func (m *RequestUnion) GetRequestUnionInner() isRequestUnion_RequestUnionInner { @@ -347,7 +347,7 @@ type UpsertRequest struct { func (x *UpsertRequest) Reset() { *x = UpsertRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_2024_07_proto_msgTypes[4] + mi := &file_db_data_2024_10_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -360,7 +360,7 @@ func (x *UpsertRequest) String() string { func (*UpsertRequest) ProtoMessage() {} func (x *UpsertRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_2024_07_proto_msgTypes[4] + mi := &file_db_data_2024_10_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -373,7 +373,7 @@ func (x *UpsertRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpsertRequest.ProtoReflect.Descriptor instead. func (*UpsertRequest) Descriptor() ([]byte, []int) { - return file_data_2024_07_proto_rawDescGZIP(), []int{4} + return file_db_data_2024_10_proto_rawDescGZIP(), []int{4} } func (x *UpsertRequest) GetVectors() []*Vector { @@ -403,7 +403,7 @@ type UpsertResponse struct { func (x *UpsertResponse) Reset() { *x = UpsertResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_2024_07_proto_msgTypes[5] + mi := &file_db_data_2024_10_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -416,7 +416,7 @@ func (x *UpsertResponse) String() string { func (*UpsertResponse) ProtoMessage() {} func (x *UpsertResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_2024_07_proto_msgTypes[5] + mi := &file_db_data_2024_10_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -429,7 +429,7 @@ func (x *UpsertResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UpsertResponse.ProtoReflect.Descriptor instead. func (*UpsertResponse) Descriptor() ([]byte, []int) { - return file_data_2024_07_proto_rawDescGZIP(), []int{5} + return file_db_data_2024_10_proto_rawDescGZIP(), []int{5} } func (x *UpsertResponse) GetUpsertedCount() uint32 { @@ -461,7 +461,7 @@ type DeleteRequest struct { func (x *DeleteRequest) Reset() { *x = DeleteRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_2024_07_proto_msgTypes[6] + mi := &file_db_data_2024_10_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -474,7 +474,7 @@ func (x *DeleteRequest) String() string { func (*DeleteRequest) ProtoMessage() {} func (x *DeleteRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_2024_07_proto_msgTypes[6] + mi := &file_db_data_2024_10_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -487,7 +487,7 @@ func (x *DeleteRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead. func (*DeleteRequest) Descriptor() ([]byte, []int) { - return file_data_2024_07_proto_rawDescGZIP(), []int{6} + return file_db_data_2024_10_proto_rawDescGZIP(), []int{6} } func (x *DeleteRequest) GetIds() []string { @@ -528,7 +528,7 @@ type DeleteResponse struct { func (x *DeleteResponse) Reset() { *x = DeleteResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_2024_07_proto_msgTypes[7] + mi := &file_db_data_2024_10_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -541,7 +541,7 @@ func (x *DeleteResponse) String() string { func (*DeleteResponse) ProtoMessage() {} func (x *DeleteResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_2024_07_proto_msgTypes[7] + mi := &file_db_data_2024_10_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -554,7 +554,7 @@ func (x *DeleteResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead. func (*DeleteResponse) Descriptor() ([]byte, []int) { - return file_data_2024_07_proto_rawDescGZIP(), []int{7} + return file_db_data_2024_10_proto_rawDescGZIP(), []int{7} } // The request for the `fetch` operation. @@ -571,7 +571,7 @@ type FetchRequest struct { func (x *FetchRequest) Reset() { *x = FetchRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_2024_07_proto_msgTypes[8] + mi := &file_db_data_2024_10_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -584,7 +584,7 @@ func (x *FetchRequest) String() string { func (*FetchRequest) ProtoMessage() {} func (x *FetchRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_2024_07_proto_msgTypes[8] + mi := &file_db_data_2024_10_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -597,7 +597,7 @@ func (x *FetchRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use FetchRequest.ProtoReflect.Descriptor instead. func (*FetchRequest) Descriptor() ([]byte, []int) { - return file_data_2024_07_proto_rawDescGZIP(), []int{8} + return file_db_data_2024_10_proto_rawDescGZIP(), []int{8} } func (x *FetchRequest) GetIds() []string { @@ -631,7 +631,7 @@ type FetchResponse struct { func (x *FetchResponse) Reset() { *x = FetchResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_2024_07_proto_msgTypes[9] + mi := &file_db_data_2024_10_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -644,7 +644,7 @@ func (x *FetchResponse) String() string { func (*FetchResponse) ProtoMessage() {} func (x *FetchResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_2024_07_proto_msgTypes[9] + mi := &file_db_data_2024_10_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -657,7 +657,7 @@ func (x *FetchResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use FetchResponse.ProtoReflect.Descriptor instead. func (*FetchResponse) Descriptor() ([]byte, []int) { - return file_data_2024_07_proto_rawDescGZIP(), []int{9} + return file_db_data_2024_10_proto_rawDescGZIP(), []int{9} } func (x *FetchResponse) GetVectors() map[string]*Vector { @@ -699,7 +699,7 @@ type ListRequest struct { func (x *ListRequest) Reset() { *x = ListRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_2024_07_proto_msgTypes[10] + mi := &file_db_data_2024_10_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -712,7 +712,7 @@ func (x *ListRequest) String() string { func (*ListRequest) ProtoMessage() {} func (x *ListRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_2024_07_proto_msgTypes[10] + mi := &file_db_data_2024_10_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -725,7 +725,7 @@ func (x *ListRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListRequest.ProtoReflect.Descriptor instead. func (*ListRequest) Descriptor() ([]byte, []int) { - return file_data_2024_07_proto_rawDescGZIP(), []int{10} + return file_db_data_2024_10_proto_rawDescGZIP(), []int{10} } func (x *ListRequest) GetPrefix() string { @@ -767,7 +767,7 @@ type Pagination struct { func (x *Pagination) Reset() { *x = Pagination{} if protoimpl.UnsafeEnabled { - mi := &file_data_2024_07_proto_msgTypes[11] + mi := &file_db_data_2024_10_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -780,7 +780,7 @@ func (x *Pagination) String() string { func (*Pagination) ProtoMessage() {} func (x *Pagination) ProtoReflect() protoreflect.Message { - mi := &file_data_2024_07_proto_msgTypes[11] + mi := &file_db_data_2024_10_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -793,7 +793,7 @@ func (x *Pagination) ProtoReflect() protoreflect.Message { // Deprecated: Use Pagination.ProtoReflect.Descriptor instead. func (*Pagination) Descriptor() ([]byte, []int) { - return file_data_2024_07_proto_rawDescGZIP(), []int{11} + return file_db_data_2024_10_proto_rawDescGZIP(), []int{11} } func (x *Pagination) GetNext() string { @@ -814,7 +814,7 @@ type ListItem struct { func (x *ListItem) Reset() { *x = ListItem{} if protoimpl.UnsafeEnabled { - mi := &file_data_2024_07_proto_msgTypes[12] + mi := &file_db_data_2024_10_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -827,7 +827,7 @@ func (x *ListItem) String() string { func (*ListItem) ProtoMessage() {} func (x *ListItem) ProtoReflect() protoreflect.Message { - mi := &file_data_2024_07_proto_msgTypes[12] + mi := &file_db_data_2024_10_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -840,7 +840,7 @@ func (x *ListItem) ProtoReflect() protoreflect.Message { // Deprecated: Use ListItem.ProtoReflect.Descriptor instead. func (*ListItem) Descriptor() ([]byte, []int) { - return file_data_2024_07_proto_rawDescGZIP(), []int{12} + return file_db_data_2024_10_proto_rawDescGZIP(), []int{12} } func (x *ListItem) GetId() string { @@ -869,7 +869,7 @@ type ListResponse struct { func (x *ListResponse) Reset() { *x = ListResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_2024_07_proto_msgTypes[13] + mi := &file_db_data_2024_10_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -882,7 +882,7 @@ func (x *ListResponse) String() string { func (*ListResponse) ProtoMessage() {} func (x *ListResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_2024_07_proto_msgTypes[13] + mi := &file_db_data_2024_10_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -895,7 +895,7 @@ func (x *ListResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListResponse.ProtoReflect.Descriptor instead. func (*ListResponse) Descriptor() ([]byte, []int) { - return file_data_2024_07_proto_rawDescGZIP(), []int{13} + return file_db_data_2024_10_proto_rawDescGZIP(), []int{13} } func (x *ListResponse) GetVectors() []*ListItem { @@ -947,7 +947,7 @@ type QueryVector struct { func (x *QueryVector) Reset() { *x = QueryVector{} if protoimpl.UnsafeEnabled { - mi := &file_data_2024_07_proto_msgTypes[14] + mi := &file_db_data_2024_10_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -960,7 +960,7 @@ func (x *QueryVector) String() string { func (*QueryVector) ProtoMessage() {} func (x *QueryVector) ProtoReflect() protoreflect.Message { - mi := &file_data_2024_07_proto_msgTypes[14] + mi := &file_db_data_2024_10_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -973,7 +973,7 @@ func (x *QueryVector) ProtoReflect() protoreflect.Message { // Deprecated: Use QueryVector.ProtoReflect.Descriptor instead. func (*QueryVector) Descriptor() ([]byte, []int) { - return file_data_2024_07_proto_rawDescGZIP(), []int{14} + return file_db_data_2024_10_proto_rawDescGZIP(), []int{14} } func (x *QueryVector) GetValues() []float32 { @@ -1029,7 +1029,7 @@ type QueryRequest struct { IncludeMetadata bool `protobuf:"varint,5,opt,name=include_metadata,json=includeMetadata,proto3" json:"include_metadata,omitempty"` // DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or `id`. // - // Deprecated: Marked as deprecated in data_2024-07.proto. + // Deprecated: Marked as deprecated in db_data_2024-10.proto. Queries []*QueryVector `protobuf:"bytes,6,rep,name=queries,proto3" json:"queries,omitempty"` // The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`. Vector []float32 `protobuf:"fixed32,7,rep,packed,name=vector,proto3" json:"vector,omitempty"` @@ -1042,7 +1042,7 @@ type QueryRequest struct { func (x *QueryRequest) Reset() { *x = QueryRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_2024_07_proto_msgTypes[15] + mi := &file_db_data_2024_10_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1055,7 +1055,7 @@ func (x *QueryRequest) String() string { func (*QueryRequest) ProtoMessage() {} func (x *QueryRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_2024_07_proto_msgTypes[15] + mi := &file_db_data_2024_10_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1068,7 +1068,7 @@ func (x *QueryRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use QueryRequest.ProtoReflect.Descriptor instead. func (*QueryRequest) Descriptor() ([]byte, []int) { - return file_data_2024_07_proto_rawDescGZIP(), []int{15} + return file_db_data_2024_10_proto_rawDescGZIP(), []int{15} } func (x *QueryRequest) GetNamespace() string { @@ -1106,7 +1106,7 @@ func (x *QueryRequest) GetIncludeMetadata() bool { return false } -// Deprecated: Marked as deprecated in data_2024-07.proto. +// Deprecated: Marked as deprecated in db_data_2024-10.proto. func (x *QueryRequest) GetQueries() []*QueryVector { if x != nil { return x.Queries @@ -1150,7 +1150,7 @@ type SingleQueryResults struct { func (x *SingleQueryResults) Reset() { *x = SingleQueryResults{} if protoimpl.UnsafeEnabled { - mi := &file_data_2024_07_proto_msgTypes[16] + mi := &file_db_data_2024_10_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1163,7 +1163,7 @@ func (x *SingleQueryResults) String() string { func (*SingleQueryResults) ProtoMessage() {} func (x *SingleQueryResults) ProtoReflect() protoreflect.Message { - mi := &file_data_2024_07_proto_msgTypes[16] + mi := &file_db_data_2024_10_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1176,7 +1176,7 @@ func (x *SingleQueryResults) ProtoReflect() protoreflect.Message { // Deprecated: Use SingleQueryResults.ProtoReflect.Descriptor instead. func (*SingleQueryResults) Descriptor() ([]byte, []int) { - return file_data_2024_07_proto_rawDescGZIP(), []int{16} + return file_db_data_2024_10_proto_rawDescGZIP(), []int{16} } func (x *SingleQueryResults) GetMatches() []*ScoredVector { @@ -1201,7 +1201,7 @@ type QueryResponse struct { // DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. // - // Deprecated: Marked as deprecated in data_2024-07.proto. + // Deprecated: Marked as deprecated in db_data_2024-10.proto. Results []*SingleQueryResults `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` // The matches for the vectors. Matches []*ScoredVector `protobuf:"bytes,2,rep,name=matches,proto3" json:"matches,omitempty"` @@ -1214,7 +1214,7 @@ type QueryResponse struct { func (x *QueryResponse) Reset() { *x = QueryResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_2024_07_proto_msgTypes[17] + mi := &file_db_data_2024_10_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1227,7 +1227,7 @@ func (x *QueryResponse) String() string { func (*QueryResponse) ProtoMessage() {} func (x *QueryResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_2024_07_proto_msgTypes[17] + mi := &file_db_data_2024_10_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1240,10 +1240,10 @@ func (x *QueryResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use QueryResponse.ProtoReflect.Descriptor instead. func (*QueryResponse) Descriptor() ([]byte, []int) { - return file_data_2024_07_proto_rawDescGZIP(), []int{17} + return file_db_data_2024_10_proto_rawDescGZIP(), []int{17} } -// Deprecated: Marked as deprecated in data_2024-07.proto. +// Deprecated: Marked as deprecated in db_data_2024-10.proto. func (x *QueryResponse) GetResults() []*SingleQueryResults { if x != nil { return x.Results @@ -1284,7 +1284,7 @@ type Usage struct { func (x *Usage) Reset() { *x = Usage{} if protoimpl.UnsafeEnabled { - mi := &file_data_2024_07_proto_msgTypes[18] + mi := &file_db_data_2024_10_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1297,7 +1297,7 @@ func (x *Usage) String() string { func (*Usage) ProtoMessage() {} func (x *Usage) ProtoReflect() protoreflect.Message { - mi := &file_data_2024_07_proto_msgTypes[18] + mi := &file_db_data_2024_10_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1310,7 +1310,7 @@ func (x *Usage) ProtoReflect() protoreflect.Message { // Deprecated: Use Usage.ProtoReflect.Descriptor instead. func (*Usage) Descriptor() ([]byte, []int) { - return file_data_2024_07_proto_rawDescGZIP(), []int{18} + return file_db_data_2024_10_proto_rawDescGZIP(), []int{18} } func (x *Usage) GetReadUnits() uint32 { @@ -1340,7 +1340,7 @@ type UpdateRequest struct { func (x *UpdateRequest) Reset() { *x = UpdateRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_2024_07_proto_msgTypes[19] + mi := &file_db_data_2024_10_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1353,7 +1353,7 @@ func (x *UpdateRequest) String() string { func (*UpdateRequest) ProtoMessage() {} func (x *UpdateRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_2024_07_proto_msgTypes[19] + mi := &file_db_data_2024_10_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1366,7 +1366,7 @@ func (x *UpdateRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead. func (*UpdateRequest) Descriptor() ([]byte, []int) { - return file_data_2024_07_proto_rawDescGZIP(), []int{19} + return file_db_data_2024_10_proto_rawDescGZIP(), []int{19} } func (x *UpdateRequest) GetId() string { @@ -1414,7 +1414,7 @@ type UpdateResponse struct { func (x *UpdateResponse) Reset() { *x = UpdateResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_2024_07_proto_msgTypes[20] + mi := &file_db_data_2024_10_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1427,7 +1427,7 @@ func (x *UpdateResponse) String() string { func (*UpdateResponse) ProtoMessage() {} func (x *UpdateResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_2024_07_proto_msgTypes[20] + mi := &file_db_data_2024_10_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1440,7 +1440,7 @@ func (x *UpdateResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead. func (*UpdateResponse) Descriptor() ([]byte, []int) { - return file_data_2024_07_proto_rawDescGZIP(), []int{20} + return file_db_data_2024_10_proto_rawDescGZIP(), []int{20} } // The request for the `describe_index_stats` operation. @@ -1458,7 +1458,7 @@ type DescribeIndexStatsRequest struct { func (x *DescribeIndexStatsRequest) Reset() { *x = DescribeIndexStatsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_data_2024_07_proto_msgTypes[21] + mi := &file_db_data_2024_10_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1471,7 +1471,7 @@ func (x *DescribeIndexStatsRequest) String() string { func (*DescribeIndexStatsRequest) ProtoMessage() {} func (x *DescribeIndexStatsRequest) ProtoReflect() protoreflect.Message { - mi := &file_data_2024_07_proto_msgTypes[21] + mi := &file_db_data_2024_10_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1484,7 +1484,7 @@ func (x *DescribeIndexStatsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DescribeIndexStatsRequest.ProtoReflect.Descriptor instead. func (*DescribeIndexStatsRequest) Descriptor() ([]byte, []int) { - return file_data_2024_07_proto_rawDescGZIP(), []int{21} + return file_db_data_2024_10_proto_rawDescGZIP(), []int{21} } func (x *DescribeIndexStatsRequest) GetFilter() *structpb.Struct { @@ -1508,7 +1508,7 @@ type NamespaceSummary struct { func (x *NamespaceSummary) Reset() { *x = NamespaceSummary{} if protoimpl.UnsafeEnabled { - mi := &file_data_2024_07_proto_msgTypes[22] + mi := &file_db_data_2024_10_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1521,7 +1521,7 @@ func (x *NamespaceSummary) String() string { func (*NamespaceSummary) ProtoMessage() {} func (x *NamespaceSummary) ProtoReflect() protoreflect.Message { - mi := &file_data_2024_07_proto_msgTypes[22] + mi := &file_db_data_2024_10_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1534,7 +1534,7 @@ func (x *NamespaceSummary) ProtoReflect() protoreflect.Message { // Deprecated: Use NamespaceSummary.ProtoReflect.Descriptor instead. func (*NamespaceSummary) Descriptor() ([]byte, []int) { - return file_data_2024_07_proto_rawDescGZIP(), []int{22} + return file_db_data_2024_10_proto_rawDescGZIP(), []int{22} } func (x *NamespaceSummary) GetVectorCount() uint32 { @@ -1569,7 +1569,7 @@ type DescribeIndexStatsResponse struct { func (x *DescribeIndexStatsResponse) Reset() { *x = DescribeIndexStatsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_data_2024_07_proto_msgTypes[23] + mi := &file_db_data_2024_10_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1582,7 +1582,7 @@ func (x *DescribeIndexStatsResponse) String() string { func (*DescribeIndexStatsResponse) ProtoMessage() {} func (x *DescribeIndexStatsResponse) ProtoReflect() protoreflect.Message { - mi := &file_data_2024_07_proto_msgTypes[23] + mi := &file_db_data_2024_10_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1595,7 +1595,7 @@ func (x *DescribeIndexStatsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DescribeIndexStatsResponse.ProtoReflect.Descriptor instead. func (*DescribeIndexStatsResponse) Descriptor() ([]byte, []int) { - return file_data_2024_07_proto_rawDescGZIP(), []int{23} + return file_db_data_2024_10_proto_rawDescGZIP(), []int{23} } func (x *DescribeIndexStatsResponse) GetNamespaces() map[string]*NamespaceSummary { @@ -1626,272 +1626,272 @@ func (x *DescribeIndexStatsResponse) GetTotalVectorCount() uint32 { return 0 } -var File_data_2024_07_proto protoreflect.FileDescriptor - -var file_data_2024_07_proto_rawDesc = []byte{ - 0x0a, 0x12, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x30, 0x32, 0x34, 0x2d, 0x30, 0x37, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x4a, 0x0a, 0x0c, 0x53, 0x70, 0x61, 0x72, 0x73, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0d, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, +var File_db_data_2024_10_proto protoreflect.FileDescriptor + +var file_db_data_2024_10_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x64, 0x62, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x30, 0x32, 0x34, 0x2d, 0x31, + 0x30, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4a, 0x0a, 0x0c, 0x53, 0x70, 0x61, 0x72, 0x73, 0x65, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0d, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, 0x69, 0x6e, 0x64, 0x69, + 0x63, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x02, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x22, 0xa3, 0x01, 0x0a, 0x06, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x13, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x02, - 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0xa3, 0x01, - 0x0a, 0x06, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x02, 0x42, 0x03, 0xe0, - 0x41, 0x02, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x0d, 0x73, 0x70, - 0x61, 0x72, 0x73, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x32, 0x0a, + 0x0d, 0x73, 0x70, 0x61, 0x72, 0x73, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x53, 0x70, 0x61, 0x72, 0x73, 0x65, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x52, 0x0c, 0x73, 0x70, 0x61, 0x72, 0x73, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0xba, 0x01, 0x0a, 0x0c, 0x53, 0x63, 0x6f, 0x72, 0x65, + 0x64, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, + 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x73, 0x63, 0x6f, + 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x02, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x0d, 0x73, 0x70, + 0x61, 0x72, 0x73, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x53, 0x70, 0x61, 0x72, 0x73, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x0c, 0x73, 0x70, 0x61, 0x72, 0x73, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x33, - 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x22, 0xba, 0x01, 0x0a, 0x0c, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x64, 0x56, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, - 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x02, 0x52, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x0d, 0x73, 0x70, 0x61, 0x72, 0x73, - 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, - 0x2e, 0x53, 0x70, 0x61, 0x72, 0x73, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x0c, 0x73, - 0x70, 0x61, 0x72, 0x73, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x61, 0x74, 0x61, 0x22, 0xa1, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x55, + 0x6e, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x06, 0x75, 0x70, 0x73, 0x65, 0x72, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x06, 0x75, 0x70, 0x73, 0x65, 0x72, 0x74, 0x12, 0x28, + 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, + 0x52, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x06, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x42, 0x13, 0x0a, 0x11, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x55, 0x6e, 0x69, + 0x6f, 0x6e, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x22, 0x55, 0x0a, 0x0d, 0x55, 0x70, 0x73, 0x65, 0x72, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x07, 0x76, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x56, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, + 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x37, + 0x0a, 0x0e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x25, 0x0a, 0x0e, 0x75, 0x70, 0x73, 0x65, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x75, 0x70, 0x73, 0x65, 0x72, 0x74, + 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x8f, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x64, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x61, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x6c, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x10, 0x0a, 0x0e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x0a, 0x0c, 0x46, + 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x03, 0x69, + 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x03, 0x69, + 0x64, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x22, 0xd6, 0x01, 0x0a, 0x0d, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x2e, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x07, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x55, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, + 0x52, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x43, 0x0a, 0x0c, 0x56, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x56, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x22, 0xbd, 0x01, 0x0a, 0x0b, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x70, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x88, 0x01, + 0x01, 0x12, 0x2e, 0x0a, 0x10, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0f, 0x70, + 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, + 0x01, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x20, 0x0a, 0x0a, 0x50, 0x61, 0x67, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x65, 0x78, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x65, 0x78, 0x74, 0x22, 0x1a, 0x0a, 0x08, 0x4c, + 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xbf, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x07, 0x76, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x49, 0x74, 0x65, 0x6d, 0x52, 0x07, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x30, 0x0a, + 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0b, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, + 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, + 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, + 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x55, + 0x73, 0x61, 0x67, 0x65, 0x48, 0x01, 0x52, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, + 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x22, 0xc2, 0x01, 0x0a, 0x0b, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x02, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x0d, 0x73, 0x70, 0x61, 0x72, 0x73, 0x65, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, + 0x53, 0x70, 0x61, 0x72, 0x73, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x0c, 0x73, 0x70, + 0x61, 0x72, 0x73, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x13, 0x0a, 0x05, 0x74, 0x6f, + 0x70, 0x5f, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x74, 0x6f, 0x70, 0x4b, 0x12, + 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2f, 0x0a, + 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x22, 0xa1, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x55, 0x6e, 0x69, 0x6f, - 0x6e, 0x12, 0x28, 0x0a, 0x06, 0x75, 0x70, 0x73, 0x65, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0e, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x48, 0x00, 0x52, 0x06, 0x75, 0x70, 0x73, 0x65, 0x72, 0x74, 0x12, 0x28, 0x0a, 0x06, 0x64, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x06, 0x64, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, - 0x13, 0x0a, 0x11, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x49, - 0x6e, 0x6e, 0x65, 0x72, 0x22, 0x55, 0x0a, 0x0d, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x07, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x42, - 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x1c, 0x0a, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x37, 0x0a, 0x0e, 0x55, - 0x70, 0x73, 0x65, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, - 0x0e, 0x75, 0x70, 0x73, 0x65, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x75, 0x70, 0x73, 0x65, 0x72, 0x74, 0x65, 0x64, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x8f, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x5f, 0x61, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x64, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x41, 0x6c, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x10, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x0a, 0x0c, 0x46, 0x65, 0x74, 0x63, - 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x03, 0x69, 0x64, 0x73, 0x12, - 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0xd6, 0x01, - 0x0a, 0x0d, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x35, 0x0a, 0x07, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x76, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x55, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x05, 0x75, - 0x73, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x43, 0x0a, 0x0c, 0x56, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x56, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x22, 0xbd, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2e, - 0x0a, 0x10, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0f, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x1c, - 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x09, 0x0a, 0x07, - 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x20, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x65, 0x78, 0x74, 0x22, 0x1a, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, - 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x22, 0xbf, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x07, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, - 0x6d, 0x52, 0x07, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x30, 0x0a, 0x0a, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, - 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x05, 0x75, 0x73, - 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x55, 0x73, 0x61, 0x67, - 0x65, 0x48, 0x01, 0x52, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, - 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x22, 0xc2, 0x01, 0x0a, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x02, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x76, 0x61, 0x6c, + 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0xd1, + 0x02, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x18, 0x0a, + 0x05, 0x74, 0x6f, 0x70, 0x5f, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x03, 0xe0, 0x41, + 0x02, 0x52, 0x04, 0x74, 0x6f, 0x70, 0x4b, 0x12, 0x2f, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, + 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x63, 0x6c, + 0x75, 0x64, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, + 0x29, 0x0a, 0x10, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, + 0x64, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x0a, 0x07, 0x71, 0x75, + 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x71, + 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x02, 0x52, 0x06, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x32, + 0x0a, 0x0d, 0x73, 0x70, 0x61, 0x72, 0x73, 0x65, 0x5f, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x53, 0x70, 0x61, 0x72, 0x73, 0x65, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x52, 0x0c, 0x73, 0x70, 0x61, 0x72, 0x73, 0x65, 0x56, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x22, 0x5b, 0x0a, 0x12, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x27, 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x53, 0x63, 0x6f, 0x72, + 0x65, 0x64, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, + 0xb6, 0x01, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x31, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x73, 0x12, 0x27, 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x64, 0x56, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x52, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x12, 0x1c, 0x0a, + 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x05, 0x75, + 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x55, 0x73, 0x61, + 0x67, 0x65, 0x48, 0x00, 0x52, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x22, 0x3a, 0x0a, 0x05, 0x55, 0x73, 0x61, 0x67, + 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x09, 0x72, 0x65, 0x61, 0x64, 0x55, 0x6e, 0x69, + 0x74, 0x73, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x75, + 0x6e, 0x69, 0x74, 0x73, 0x22, 0xca, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x02, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x0d, 0x73, 0x70, 0x61, 0x72, 0x73, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x53, 0x70, 0x61, 0x72, 0x73, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x0c, 0x73, 0x70, 0x61, 0x72, 0x73, - 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x13, 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x5f, 0x6b, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x74, 0x6f, 0x70, 0x4b, 0x12, 0x1c, 0x0a, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, - 0x75, 0x63, 0x74, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0xd1, 0x02, 0x0a, 0x0c, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x05, 0x74, 0x6f, - 0x70, 0x5f, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, - 0x74, 0x6f, 0x70, 0x4b, 0x12, 0x2f, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, - 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x10, - 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x0a, 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, - 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, - 0x69, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x07, 0x20, - 0x03, 0x28, 0x02, 0x52, 0x06, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x32, 0x0a, 0x0d, 0x73, - 0x70, 0x61, 0x72, 0x73, 0x65, 0x5f, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x53, 0x70, 0x61, 0x72, 0x73, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x52, 0x0c, 0x73, 0x70, 0x61, 0x72, 0x73, 0x65, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, - 0x5b, 0x0a, 0x12, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x27, 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x64, 0x56, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x12, 0x1c, - 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0xb6, 0x01, 0x0a, - 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, - 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x13, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x73, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x73, 0x12, 0x27, 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x64, 0x56, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x52, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x05, 0x75, 0x73, 0x61, 0x67, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x55, 0x73, 0x61, 0x67, 0x65, 0x48, - 0x00, 0x52, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, - 0x75, 0x73, 0x61, 0x67, 0x65, 0x22, 0x3a, 0x0a, 0x05, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, 0x22, - 0x0a, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0d, 0x48, 0x00, 0x52, 0x09, 0x72, 0x65, 0x61, 0x64, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x88, - 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x75, 0x6e, 0x69, 0x74, - 0x73, 0x22, 0xca, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x03, 0xe0, 0x41, 0x02, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x02, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x12, 0x32, 0x0a, 0x0d, 0x73, 0x70, 0x61, 0x72, 0x73, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x53, 0x70, 0x61, 0x72, 0x73, 0x65, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x0c, 0x73, 0x70, 0x61, 0x72, 0x73, 0x65, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x0c, 0x73, 0x65, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, - 0x75, 0x63, 0x74, 0x52, 0x0b, 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x10, - 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x4c, 0x0a, 0x19, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x64, 0x65, - 0x78, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, - 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x0c, 0x73, 0x65, 0x74, 0x5f, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x35, - 0x0a, 0x10, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, - 0x72, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xae, 0x02, 0x0a, 0x1a, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x62, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x62, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x65, 0x73, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0d, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x46, 0x75, - 0x6c, 0x6c, 0x6e, 0x65, 0x73, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, - 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x50, 0x0a, 0x0f, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x27, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0xb9, 0x04, 0x0a, 0x0d, 0x56, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x45, 0x0a, 0x06, 0x55, 0x70, 0x73, 0x65, - 0x72, 0x74, 0x12, 0x0e, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, - 0x2f, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x75, 0x70, 0x73, 0x65, 0x72, 0x74, 0x12, - 0x58, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x0e, 0x2e, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x27, 0x3a, 0x01, 0x2a, 0x5a, 0x11, 0x2a, 0x0f, 0x2f, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x73, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x22, 0x0f, 0x2f, 0x76, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x73, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x3e, 0x0a, 0x05, 0x46, 0x65, 0x74, - 0x63, 0x68, 0x12, 0x0d, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x0e, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x76, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x73, 0x2f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x12, 0x3a, 0x0a, 0x04, 0x4c, 0x69, 0x73, - 0x74, 0x12, 0x0c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x0d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, - 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x0d, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x0b, 0x3a, 0x01, 0x2a, 0x22, 0x06, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x12, 0x45, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x2e, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, - 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x88, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x1a, - 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x74, - 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x44, 0x65, 0x73, + 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0b, 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x22, 0x10, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x4c, 0x0a, 0x19, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x2f, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x22, 0x35, 0x0a, 0x10, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x76, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xae, 0x02, 0x0a, 0x1a, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x3a, - 0x01, 0x2a, 0x5a, 0x17, 0x12, 0x15, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x5f, - 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x22, 0x15, 0x2f, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x73, 0x74, 0x61, - 0x74, 0x73, 0x42, 0x4b, 0x0a, 0x11, 0x69, 0x6f, 0x2e, 0x70, 0x69, 0x6e, 0x65, 0x63, 0x6f, 0x6e, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x69, 0x6e, 0x65, 0x63, 0x6f, 0x6e, 0x65, 0x2d, 0x69, - 0x6f, 0x2f, 0x67, 0x6f, 0x2d, 0x70, 0x69, 0x6e, 0x65, 0x63, 0x6f, 0x6e, 0x65, 0x2f, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x44, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x66, 0x75, 0x6c, 0x6c, + 0x6e, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0d, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x46, 0x75, 0x6c, 0x6c, 0x6e, 0x65, 0x73, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x5f, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x56, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x50, 0x0a, 0x0f, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x27, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0xb9, 0x04, 0x0a, 0x0d, 0x56, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x45, 0x0a, 0x06, 0x55, + 0x70, 0x73, 0x65, 0x72, 0x74, 0x12, 0x0e, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, + 0x2a, 0x22, 0x0f, 0x2f, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x75, 0x70, 0x73, 0x65, + 0x72, 0x74, 0x12, 0x58, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x0e, 0x2e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x3a, 0x01, 0x2a, 0x5a, 0x11, 0x2a, 0x0f, 0x2f, 0x76, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x22, 0x0f, 0x2f, 0x76, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x3e, 0x0a, 0x05, + 0x46, 0x65, 0x74, 0x63, 0x68, 0x12, 0x0d, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x76, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x12, 0x3a, 0x0a, 0x04, + 0x4c, 0x69, 0x73, 0x74, 0x12, 0x0c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x76, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x73, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x12, 0x0d, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x0e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x11, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0b, 0x3a, 0x01, 0x2a, 0x22, 0x06, 0x2f, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x12, 0x45, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, 0x76, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x73, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x88, 0x01, 0x0a, 0x12, 0x44, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x74, 0x61, 0x74, + 0x73, 0x12, 0x1a, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x33, 0x3a, 0x01, 0x2a, 0x5a, 0x17, 0x12, 0x15, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x62, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x22, 0x15, + 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x73, 0x42, 0x4b, 0x0a, 0x11, 0x69, 0x6f, 0x2e, 0x70, 0x69, 0x6e, 0x65, + 0x63, 0x6f, 0x6e, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x69, 0x6e, 0x65, 0x63, 0x6f, 0x6e, + 0x65, 0x2d, 0x69, 0x6f, 0x2f, 0x67, 0x6f, 0x2d, 0x70, 0x69, 0x6e, 0x65, 0x63, 0x6f, 0x6e, 0x65, + 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, + 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_data_2024_07_proto_rawDescOnce sync.Once - file_data_2024_07_proto_rawDescData = file_data_2024_07_proto_rawDesc + file_db_data_2024_10_proto_rawDescOnce sync.Once + file_db_data_2024_10_proto_rawDescData = file_db_data_2024_10_proto_rawDesc ) -func file_data_2024_07_proto_rawDescGZIP() []byte { - file_data_2024_07_proto_rawDescOnce.Do(func() { - file_data_2024_07_proto_rawDescData = protoimpl.X.CompressGZIP(file_data_2024_07_proto_rawDescData) +func file_db_data_2024_10_proto_rawDescGZIP() []byte { + file_db_data_2024_10_proto_rawDescOnce.Do(func() { + file_db_data_2024_10_proto_rawDescData = protoimpl.X.CompressGZIP(file_db_data_2024_10_proto_rawDescData) }) - return file_data_2024_07_proto_rawDescData + return file_db_data_2024_10_proto_rawDescData } -var file_data_2024_07_proto_msgTypes = make([]protoimpl.MessageInfo, 26) -var file_data_2024_07_proto_goTypes = []interface{}{ +var file_db_data_2024_10_proto_msgTypes = make([]protoimpl.MessageInfo, 26) +var file_db_data_2024_10_proto_goTypes = []interface{}{ (*SparseValues)(nil), // 0: SparseValues (*Vector)(nil), // 1: Vector (*ScoredVector)(nil), // 2: ScoredVector @@ -1920,7 +1920,7 @@ var file_data_2024_07_proto_goTypes = []interface{}{ nil, // 25: DescribeIndexStatsResponse.NamespacesEntry (*structpb.Struct)(nil), // 26: google.protobuf.Struct } -var file_data_2024_07_proto_depIdxs = []int32{ +var file_db_data_2024_10_proto_depIdxs = []int32{ 0, // 0: Vector.sparse_values:type_name -> SparseValues 26, // 1: Vector.metadata:type_name -> google.protobuf.Struct 0, // 2: ScoredVector.sparse_values:type_name -> SparseValues @@ -1971,13 +1971,13 @@ var file_data_2024_07_proto_depIdxs = []int32{ 0, // [0:29] is the sub-list for field type_name } -func init() { file_data_2024_07_proto_init() } -func file_data_2024_07_proto_init() { - if File_data_2024_07_proto != nil { +func init() { file_db_data_2024_10_proto_init() } +func file_db_data_2024_10_proto_init() { + if File_db_data_2024_10_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_data_2024_07_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_db_data_2024_10_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SparseValues); i { case 0: return &v.state @@ -1989,7 +1989,7 @@ func file_data_2024_07_proto_init() { return nil } } - file_data_2024_07_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_db_data_2024_10_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Vector); i { case 0: return &v.state @@ -2001,7 +2001,7 @@ func file_data_2024_07_proto_init() { return nil } } - file_data_2024_07_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_db_data_2024_10_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ScoredVector); i { case 0: return &v.state @@ -2013,7 +2013,7 @@ func file_data_2024_07_proto_init() { return nil } } - file_data_2024_07_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_db_data_2024_10_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RequestUnion); i { case 0: return &v.state @@ -2025,7 +2025,7 @@ func file_data_2024_07_proto_init() { return nil } } - file_data_2024_07_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_db_data_2024_10_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpsertRequest); i { case 0: return &v.state @@ -2037,7 +2037,7 @@ func file_data_2024_07_proto_init() { return nil } } - file_data_2024_07_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_db_data_2024_10_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpsertResponse); i { case 0: return &v.state @@ -2049,7 +2049,7 @@ func file_data_2024_07_proto_init() { return nil } } - file_data_2024_07_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_db_data_2024_10_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteRequest); i { case 0: return &v.state @@ -2061,7 +2061,7 @@ func file_data_2024_07_proto_init() { return nil } } - file_data_2024_07_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_db_data_2024_10_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteResponse); i { case 0: return &v.state @@ -2073,7 +2073,7 @@ func file_data_2024_07_proto_init() { return nil } } - file_data_2024_07_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_db_data_2024_10_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FetchRequest); i { case 0: return &v.state @@ -2085,7 +2085,7 @@ func file_data_2024_07_proto_init() { return nil } } - file_data_2024_07_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_db_data_2024_10_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FetchResponse); i { case 0: return &v.state @@ -2097,7 +2097,7 @@ func file_data_2024_07_proto_init() { return nil } } - file_data_2024_07_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_db_data_2024_10_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListRequest); i { case 0: return &v.state @@ -2109,7 +2109,7 @@ func file_data_2024_07_proto_init() { return nil } } - file_data_2024_07_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_db_data_2024_10_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Pagination); i { case 0: return &v.state @@ -2121,7 +2121,7 @@ func file_data_2024_07_proto_init() { return nil } } - file_data_2024_07_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_db_data_2024_10_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListItem); i { case 0: return &v.state @@ -2133,7 +2133,7 @@ func file_data_2024_07_proto_init() { return nil } } - file_data_2024_07_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_db_data_2024_10_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListResponse); i { case 0: return &v.state @@ -2145,7 +2145,7 @@ func file_data_2024_07_proto_init() { return nil } } - file_data_2024_07_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_db_data_2024_10_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryVector); i { case 0: return &v.state @@ -2157,7 +2157,7 @@ func file_data_2024_07_proto_init() { return nil } } - file_data_2024_07_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_db_data_2024_10_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryRequest); i { case 0: return &v.state @@ -2169,7 +2169,7 @@ func file_data_2024_07_proto_init() { return nil } } - file_data_2024_07_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_db_data_2024_10_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SingleQueryResults); i { case 0: return &v.state @@ -2181,7 +2181,7 @@ func file_data_2024_07_proto_init() { return nil } } - file_data_2024_07_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_db_data_2024_10_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryResponse); i { case 0: return &v.state @@ -2193,7 +2193,7 @@ func file_data_2024_07_proto_init() { return nil } } - file_data_2024_07_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_db_data_2024_10_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Usage); i { case 0: return &v.state @@ -2205,7 +2205,7 @@ func file_data_2024_07_proto_init() { return nil } } - file_data_2024_07_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_db_data_2024_10_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateRequest); i { case 0: return &v.state @@ -2217,7 +2217,7 @@ func file_data_2024_07_proto_init() { return nil } } - file_data_2024_07_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_db_data_2024_10_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateResponse); i { case 0: return &v.state @@ -2229,7 +2229,7 @@ func file_data_2024_07_proto_init() { return nil } } - file_data_2024_07_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_db_data_2024_10_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DescribeIndexStatsRequest); i { case 0: return &v.state @@ -2241,7 +2241,7 @@ func file_data_2024_07_proto_init() { return nil } } - file_data_2024_07_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_db_data_2024_10_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*NamespaceSummary); i { case 0: return &v.state @@ -2253,7 +2253,7 @@ func file_data_2024_07_proto_init() { return nil } } - file_data_2024_07_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + file_db_data_2024_10_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DescribeIndexStatsResponse); i { case 0: return &v.state @@ -2266,32 +2266,32 @@ func file_data_2024_07_proto_init() { } } } - file_data_2024_07_proto_msgTypes[3].OneofWrappers = []interface{}{ + file_db_data_2024_10_proto_msgTypes[3].OneofWrappers = []interface{}{ (*RequestUnion_Upsert)(nil), (*RequestUnion_Delete)(nil), (*RequestUnion_Update)(nil), } - file_data_2024_07_proto_msgTypes[9].OneofWrappers = []interface{}{} - file_data_2024_07_proto_msgTypes[10].OneofWrappers = []interface{}{} - file_data_2024_07_proto_msgTypes[13].OneofWrappers = []interface{}{} - file_data_2024_07_proto_msgTypes[17].OneofWrappers = []interface{}{} - file_data_2024_07_proto_msgTypes[18].OneofWrappers = []interface{}{} + file_db_data_2024_10_proto_msgTypes[9].OneofWrappers = []interface{}{} + file_db_data_2024_10_proto_msgTypes[10].OneofWrappers = []interface{}{} + file_db_data_2024_10_proto_msgTypes[13].OneofWrappers = []interface{}{} + file_db_data_2024_10_proto_msgTypes[17].OneofWrappers = []interface{}{} + file_db_data_2024_10_proto_msgTypes[18].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_data_2024_07_proto_rawDesc, + RawDescriptor: file_db_data_2024_10_proto_rawDesc, NumEnums: 0, NumMessages: 26, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_data_2024_07_proto_goTypes, - DependencyIndexes: file_data_2024_07_proto_depIdxs, - MessageInfos: file_data_2024_07_proto_msgTypes, + GoTypes: file_db_data_2024_10_proto_goTypes, + DependencyIndexes: file_db_data_2024_10_proto_depIdxs, + MessageInfos: file_db_data_2024_10_proto_msgTypes, }.Build() - File_data_2024_07_proto = out.File - file_data_2024_07_proto_rawDesc = nil - file_data_2024_07_proto_goTypes = nil - file_data_2024_07_proto_depIdxs = nil + File_db_data_2024_10_proto = out.File + file_db_data_2024_10_proto_rawDesc = nil + file_db_data_2024_10_proto_goTypes = nil + file_db_data_2024_10_proto_depIdxs = nil } diff --git a/internal/gen/data/data_2024-07_grpc.pb.go b/internal/gen/data/db_data_2024-10_grpc.pb.go similarity index 99% rename from internal/gen/data/data_2024-07_grpc.pb.go rename to internal/gen/data/db_data_2024-10_grpc.pb.go index 96fd799..88de85e 100644 --- a/internal/gen/data/data_2024-07_grpc.pb.go +++ b/internal/gen/data/db_data_2024-10_grpc.pb.go @@ -2,7 +2,7 @@ // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc v5.27.1 -// source: data_2024-07.proto +// source: db_data_2024-10.proto package data @@ -409,5 +409,5 @@ var VectorService_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "data_2024-07.proto", + Metadata: "db_data_2024-10.proto", } diff --git a/internal/gen/db_control/control_plane.oas.go b/internal/gen/db_control/control_plane.oas.go new file mode 100644 index 0000000..5088e89 --- /dev/null +++ b/internal/gen/db_control/control_plane.oas.go @@ -0,0 +1,1857 @@ +// Package db_control provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT. +package db_control + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io" + "net/http" + "net/url" + "strings" + + "github.com/oapi-codegen/runtime" +) + +const ( + ApiKeyAuthScopes = "ApiKeyAuth.Scopes" +) + +// Defines values for CollectionModelStatus. +const ( + CollectionModelStatusInitializing CollectionModelStatus = "Initializing" + CollectionModelStatusReady CollectionModelStatus = "Ready" + CollectionModelStatusTerminating CollectionModelStatus = "Terminating" +) + +// Defines values for CreateIndexRequestMetric. +const ( + CreateIndexRequestMetricCosine CreateIndexRequestMetric = "cosine" + CreateIndexRequestMetricDotproduct CreateIndexRequestMetric = "dotproduct" + CreateIndexRequestMetricEuclidean CreateIndexRequestMetric = "euclidean" +) + +// Defines values for DeletionProtection. +const ( + Disabled DeletionProtection = "disabled" + Enabled DeletionProtection = "enabled" +) + +// Defines values for ErrorResponseErrorCode. +const ( + ABORTED ErrorResponseErrorCode = "ABORTED" + ALREADYEXISTS ErrorResponseErrorCode = "ALREADY_EXISTS" + DATALOSS ErrorResponseErrorCode = "DATA_LOSS" + DEADLINEEXCEEDED ErrorResponseErrorCode = "DEADLINE_EXCEEDED" + FAILEDPRECONDITION ErrorResponseErrorCode = "FAILED_PRECONDITION" + FORBIDDEN ErrorResponseErrorCode = "FORBIDDEN" + INTERNAL ErrorResponseErrorCode = "INTERNAL" + INVALIDARGUMENT ErrorResponseErrorCode = "INVALID_ARGUMENT" + NOTFOUND ErrorResponseErrorCode = "NOT_FOUND" + OK ErrorResponseErrorCode = "OK" + OUTOFRANGE ErrorResponseErrorCode = "OUT_OF_RANGE" + PERMISSIONDENIED ErrorResponseErrorCode = "PERMISSION_DENIED" + QUOTAEXCEEDED ErrorResponseErrorCode = "QUOTA_EXCEEDED" + RESOURCEEXHAUSTED ErrorResponseErrorCode = "RESOURCE_EXHAUSTED" + UNAUTHENTICATED ErrorResponseErrorCode = "UNAUTHENTICATED" + UNAVAILABLE ErrorResponseErrorCode = "UNAVAILABLE" + UNIMPLEMENTED ErrorResponseErrorCode = "UNIMPLEMENTED" + UNKNOWN ErrorResponseErrorCode = "UNKNOWN" + UNPROCESSABLEENTITY ErrorResponseErrorCode = "UNPROCESSABLE_ENTITY" +) + +// Defines values for IndexModelMetric. +const ( + IndexModelMetricCosine IndexModelMetric = "cosine" + IndexModelMetricDotproduct IndexModelMetric = "dotproduct" + IndexModelMetricEuclidean IndexModelMetric = "euclidean" +) + +// Defines values for IndexModelStatusState. +const ( + IndexModelStatusStateInitializationFailed IndexModelStatusState = "InitializationFailed" + IndexModelStatusStateInitializing IndexModelStatusState = "Initializing" + IndexModelStatusStateReady IndexModelStatusState = "Ready" + IndexModelStatusStateScalingDown IndexModelStatusState = "ScalingDown" + IndexModelStatusStateScalingDownPodSize IndexModelStatusState = "ScalingDownPodSize" + IndexModelStatusStateScalingUp IndexModelStatusState = "ScalingUp" + IndexModelStatusStateScalingUpPodSize IndexModelStatusState = "ScalingUpPodSize" + IndexModelStatusStateTerminating IndexModelStatusState = "Terminating" +) + +// Defines values for ServerlessSpecCloud. +const ( + Aws ServerlessSpecCloud = "aws" + Azure ServerlessSpecCloud = "azure" + Gcp ServerlessSpecCloud = "gcp" +) + +// CollectionList The list of collections that exist in the project. +type CollectionList struct { + Collections *[]CollectionModel `json:"collections,omitempty"` +} + +// CollectionModel The CollectionModel describes the configuration and status of a Pinecone collection. +type CollectionModel struct { + // Dimension The dimension of the vectors stored in each record held in the collection. + Dimension *int32 `json:"dimension,omitempty"` + + // Environment The environment where the collection is hosted. + Environment string `json:"environment"` + + // Name The name of the collection. + Name string `json:"name"` + + // Size The size of the collection in bytes. + Size *int64 `json:"size,omitempty"` + + // Status The status of the collection. + Status CollectionModelStatus `json:"status"` + + // VectorCount The number of records stored in the collection. + VectorCount *int32 `json:"vector_count,omitempty"` +} + +// CollectionModelStatus The status of the collection. +type CollectionModelStatus string + +// ConfigureIndexRequest Configuration used to scale an index. +type ConfigureIndexRequest struct { + // DeletionProtection Whether [deletion protection](http://docs.pinecone.io/guides/indexes/prevent-index-deletion) is enabled/disabled for the index. + DeletionProtection *DeletionProtection `json:"deletion_protection,omitempty"` + Spec *struct { + Pod struct { + // PodType The type of pod to use. One of `s1`, `p1`, or `p2` appended with `.` and one of `x1`, `x2`, `x4`, or `x8`. + PodType *string `json:"pod_type,omitempty"` + + // Replicas The number of replicas. Replicas duplicate your index. They provide higher availability and throughput. Replicas can be scaled up or down as your needs change. + Replicas *int32 `json:"replicas,omitempty"` + } `json:"pod"` + } `json:"spec,omitempty"` +} + +// CreateCollectionRequest The configuration needed to create a Pinecone collection. +type CreateCollectionRequest struct { + // Name The name of the collection to be created. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. + Name string `json:"name"` + + // Source The name of the index to be used as the source for the collection. + Source string `json:"source"` +} + +// CreateIndexRequest The configuration needed to create a Pinecone index. +type CreateIndexRequest struct { + // DeletionProtection Whether [deletion protection](http://docs.pinecone.io/guides/indexes/prevent-index-deletion) is enabled/disabled for the index. + DeletionProtection *DeletionProtection `json:"deletion_protection,omitempty"` + + // Dimension The dimensions of the vectors to be inserted in the index. + Dimension int32 `json:"dimension"` + + // Metric The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. + Metric *CreateIndexRequestMetric `json:"metric,omitempty"` + + // Name The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. + Name string `json:"name"` + + // Spec The spec object defines how the index should be deployed. + // + // For serverless indexes, you define only the [cloud and region](http://docs.pinecone.io/guides/indexes/understanding-indexes#cloud-regions) where the index should be hosted. For pod-based indexes, you define the [environment](http://docs.pinecone.io/guides/indexes/understanding-indexes#pod-environments) where the index should be hosted, the [pod type and size](http://docs.pinecone.io/guides/indexes/understanding-indexes#pod-types) to use, and other index characteristics. + Spec IndexSpec `json:"spec"` +} + +// CreateIndexRequestMetric The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. +type CreateIndexRequestMetric string + +// DeletionProtection Whether [deletion protection](http://docs.pinecone.io/guides/indexes/prevent-index-deletion) is enabled/disabled for the index. +type DeletionProtection string + +// ErrorResponse The response shape used for all error responses. +type ErrorResponse struct { + // Error Detailed information about the error that occurred. + Error struct { + Code ErrorResponseErrorCode `json:"code"` + + // Details Additional information about the error. This field is not guaranteed to be present. + Details *map[string]interface{} `json:"details,omitempty"` + Message string `json:"message"` + } `json:"error"` + + // Status The HTTP status code of the error. + Status int `json:"status"` +} + +// ErrorResponseErrorCode defines model for ErrorResponse.Error.Code. +type ErrorResponseErrorCode string + +// IndexList The list of indexes that exist in the project. +type IndexList struct { + Indexes *[]IndexModel `json:"indexes,omitempty"` +} + +// IndexModel The IndexModel describes the configuration and status of a Pinecone index. +type IndexModel struct { + // DeletionProtection Whether [deletion protection](http://docs.pinecone.io/guides/indexes/prevent-index-deletion) is enabled/disabled for the index. + DeletionProtection *DeletionProtection `json:"deletion_protection,omitempty"` + + // Dimension The dimensions of the vectors to be inserted in the index. + Dimension int32 `json:"dimension"` + + // Host The URL address where the index is hosted. + Host string `json:"host"` + + // Metric The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. + Metric IndexModelMetric `json:"metric"` + + // Name The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. + Name string `json:"name"` + Spec struct { + // Pod Configuration needed to deploy a pod-based index. + Pod *PodSpec `json:"pod,omitempty"` + + // Serverless Configuration needed to deploy a serverless index. + Serverless *ServerlessSpec `json:"serverless,omitempty"` + } `json:"spec"` + Status struct { + Ready bool `json:"ready"` + State IndexModelStatusState `json:"state"` + } `json:"status"` +} + +// IndexModelMetric The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. +type IndexModelMetric string + +// IndexModelStatusState defines model for IndexModel.Status.State. +type IndexModelStatusState string + +// IndexSpec The spec object defines how the index should be deployed. +// +// For serverless indexes, you define only the [cloud and region](http://docs.pinecone.io/guides/indexes/understanding-indexes#cloud-regions) where the index should be hosted. For pod-based indexes, you define the [environment](http://docs.pinecone.io/guides/indexes/understanding-indexes#pod-environments) where the index should be hosted, the [pod type and size](http://docs.pinecone.io/guides/indexes/understanding-indexes#pod-types) to use, and other index characteristics. +type IndexSpec struct { + // Pod Configuration needed to deploy a pod-based index. + Pod *PodSpec `json:"pod,omitempty"` + + // Serverless Configuration needed to deploy a serverless index. + Serverless *ServerlessSpec `json:"serverless,omitempty"` + union json.RawMessage +} + +// IndexSpec0 defines model for . +type IndexSpec0 = interface{} + +// IndexSpec1 defines model for . +type IndexSpec1 = interface{} + +// PodSpec Configuration needed to deploy a pod-based index. +type PodSpec struct { + // Environment The environment where the index is hosted. + Environment string `json:"environment"` + + // MetadataConfig Configuration for the behavior of Pinecone's internal metadata index. By default, all metadata is indexed; when `metadata_config` is present, only specified metadata fields are indexed. These configurations are only valid for use with pod-based indexes. + MetadataConfig *struct { + // Indexed By default, all metadata is indexed; to change this behavior, use this property to specify an array of metadata fields that should be indexed. + Indexed *[]string `json:"indexed,omitempty"` + } `json:"metadata_config,omitempty"` + + // PodType The type of pod to use. One of `s1`, `p1`, or `p2` appended with `.` and one of `x1`, `x2`, `x4`, or `x8`. + PodType string `json:"pod_type"` + + // Pods The number of pods to be used in the index. This should be equal to `shards` x `replicas`.' + Pods int `json:"pods"` + + // Replicas The number of replicas. Replicas duplicate your index. They provide higher availability and throughput. Replicas can be scaled up or down as your needs change. + Replicas int32 `json:"replicas"` + + // Shards The number of shards. Shards split your data across multiple pods so you can fit more data into an index. + Shards int32 `json:"shards"` + + // SourceCollection The name of the collection to be used as the source for the index. + SourceCollection *string `json:"source_collection,omitempty"` +} + +// ServerlessSpec Configuration needed to deploy a serverless index. +type ServerlessSpec struct { + // Cloud The public cloud where you would like your index hosted. + Cloud ServerlessSpecCloud `json:"cloud"` + + // Region The region where you would like your index to be created. + Region string `json:"region"` +} + +// ServerlessSpecCloud The public cloud where you would like your index hosted. +type ServerlessSpecCloud string + +// CreateCollectionJSONRequestBody defines body for CreateCollection for application/json ContentType. +type CreateCollectionJSONRequestBody = CreateCollectionRequest + +// CreateIndexJSONRequestBody defines body for CreateIndex for application/json ContentType. +type CreateIndexJSONRequestBody = CreateIndexRequest + +// ConfigureIndexJSONRequestBody defines body for ConfigureIndex for application/json ContentType. +type ConfigureIndexJSONRequestBody = ConfigureIndexRequest + +// AsIndexSpec0 returns the union data inside the IndexSpec as a IndexSpec0 +func (t IndexSpec) AsIndexSpec0() (IndexSpec0, error) { + var body IndexSpec0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromIndexSpec0 overwrites any union data inside the IndexSpec as the provided IndexSpec0 +func (t *IndexSpec) FromIndexSpec0(v IndexSpec0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeIndexSpec0 performs a merge with any union data inside the IndexSpec, using the provided IndexSpec0 +func (t *IndexSpec) MergeIndexSpec0(v IndexSpec0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsIndexSpec1 returns the union data inside the IndexSpec as a IndexSpec1 +func (t IndexSpec) AsIndexSpec1() (IndexSpec1, error) { + var body IndexSpec1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromIndexSpec1 overwrites any union data inside the IndexSpec as the provided IndexSpec1 +func (t *IndexSpec) FromIndexSpec1(v IndexSpec1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeIndexSpec1 performs a merge with any union data inside the IndexSpec, using the provided IndexSpec1 +func (t *IndexSpec) MergeIndexSpec1(v IndexSpec1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t IndexSpec) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + if err != nil { + return nil, err + } + object := make(map[string]json.RawMessage) + if t.union != nil { + err = json.Unmarshal(b, &object) + if err != nil { + return nil, err + } + } + + if t.Pod != nil { + object["pod"], err = json.Marshal(t.Pod) + if err != nil { + return nil, fmt.Errorf("error marshaling 'pod': %w", err) + } + } + + if t.Serverless != nil { + object["serverless"], err = json.Marshal(t.Serverless) + if err != nil { + return nil, fmt.Errorf("error marshaling 'serverless': %w", err) + } + } + b, err = json.Marshal(object) + return b, err +} + +func (t *IndexSpec) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + if err != nil { + return err + } + object := make(map[string]json.RawMessage) + err = json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["pod"]; found { + err = json.Unmarshal(raw, &t.Pod) + if err != nil { + return fmt.Errorf("error reading 'pod': %w", err) + } + } + + if raw, found := object["serverless"]; found { + err = json.Unmarshal(raw, &t.Serverless) + if err != nil { + return fmt.Errorf("error reading 'serverless': %w", err) + } + } + + return err +} + +// RequestEditorFn is the function signature for the RequestEditor callback function +type RequestEditorFn func(ctx context.Context, req *http.Request) error + +// Doer performs HTTP requests. +// +// The standard http.Client implements this interface. +type HttpRequestDoer interface { + Do(req *http.Request) (*http.Response, error) +} + +// Client which conforms to the OpenAPI3 specification for this service. +type Client struct { + // The endpoint of the server conforming to this interface, with scheme, + // https://api.deepmap.com for example. This can contain a path relative + // to the server, such as https://api.deepmap.com/dev-test, and all the + // paths in the swagger spec will be appended to the server. + Server string + + // Doer for performing requests, typically a *http.Client with any + // customized settings, such as certificate chains. + Client HttpRequestDoer + + // A list of callbacks for modifying requests which are generated before sending over + // the network. + RequestEditors []RequestEditorFn +} + +// ClientOption allows setting custom parameters during construction +type ClientOption func(*Client) error + +// Creates a new Client, with reasonable defaults +func NewClient(server string, opts ...ClientOption) (*Client, error) { + // create a client with sane default values + client := Client{ + Server: server, + } + // mutate client and add all optional params + for _, o := range opts { + if err := o(&client); err != nil { + return nil, err + } + } + // ensure the server URL always has a trailing slash + if !strings.HasSuffix(client.Server, "/") { + client.Server += "/" + } + // create httpClient, if not already present + if client.Client == nil { + client.Client = &http.Client{} + } + return &client, nil +} + +// WithHTTPClient allows overriding the default Doer, which is +// automatically created using http.Client. This is useful for tests. +func WithHTTPClient(doer HttpRequestDoer) ClientOption { + return func(c *Client) error { + c.Client = doer + return nil + } +} + +// WithRequestEditorFn allows setting up a callback function, which will be +// called right before sending the request. This can be used to mutate the request. +func WithRequestEditorFn(fn RequestEditorFn) ClientOption { + return func(c *Client) error { + c.RequestEditors = append(c.RequestEditors, fn) + return nil + } +} + +// The interface specification for the client above. +type ClientInterface interface { + // ListCollections request + ListCollections(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateCollectionWithBody request with any body + CreateCollectionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateCollection(ctx context.Context, body CreateCollectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteCollection request + DeleteCollection(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DescribeCollection request + DescribeCollection(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ListIndexes request + ListIndexes(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateIndexWithBody request with any body + CreateIndexWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateIndex(ctx context.Context, body CreateIndexJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteIndex request + DeleteIndex(ctx context.Context, indexName string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DescribeIndex request + DescribeIndex(ctx context.Context, indexName string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ConfigureIndexWithBody request with any body + ConfigureIndexWithBody(ctx context.Context, indexName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + ConfigureIndex(ctx context.Context, indexName string, body ConfigureIndexJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) +} + +func (c *Client) ListCollections(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListCollectionsRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateCollectionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateCollectionRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateCollection(ctx context.Context, body CreateCollectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateCollectionRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteCollection(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteCollectionRequest(c.Server, collectionName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DescribeCollection(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDescribeCollectionRequest(c.Server, collectionName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ListIndexes(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListIndexesRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateIndexWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateIndexRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateIndex(ctx context.Context, body CreateIndexJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateIndexRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteIndex(ctx context.Context, indexName string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteIndexRequest(c.Server, indexName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DescribeIndex(ctx context.Context, indexName string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDescribeIndexRequest(c.Server, indexName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ConfigureIndexWithBody(ctx context.Context, indexName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewConfigureIndexRequestWithBody(c.Server, indexName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ConfigureIndex(ctx context.Context, indexName string, body ConfigureIndexJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewConfigureIndexRequest(c.Server, indexName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +// NewListCollectionsRequest generates requests for ListCollections +func NewListCollectionsRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/collections") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreateCollectionRequest calls the generic CreateCollection builder with application/json body +func NewCreateCollectionRequest(server string, body CreateCollectionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateCollectionRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateCollectionRequestWithBody generates requests for CreateCollection with any type of body +func NewCreateCollectionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/collections") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteCollectionRequest generates requests for DeleteCollection +func NewDeleteCollectionRequest(server string, collectionName string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "collection_name", runtime.ParamLocationPath, collectionName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/collections/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewDescribeCollectionRequest generates requests for DescribeCollection +func NewDescribeCollectionRequest(server string, collectionName string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "collection_name", runtime.ParamLocationPath, collectionName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/collections/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewListIndexesRequest generates requests for ListIndexes +func NewListIndexesRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/indexes") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreateIndexRequest calls the generic CreateIndex builder with application/json body +func NewCreateIndexRequest(server string, body CreateIndexJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateIndexRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateIndexRequestWithBody generates requests for CreateIndex with any type of body +func NewCreateIndexRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/indexes") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteIndexRequest generates requests for DeleteIndex +func NewDeleteIndexRequest(server string, indexName string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "index_name", runtime.ParamLocationPath, indexName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/indexes/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewDescribeIndexRequest generates requests for DescribeIndex +func NewDescribeIndexRequest(server string, indexName string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "index_name", runtime.ParamLocationPath, indexName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/indexes/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewConfigureIndexRequest calls the generic ConfigureIndex builder with application/json body +func NewConfigureIndexRequest(server string, indexName string, body ConfigureIndexJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewConfigureIndexRequestWithBody(server, indexName, "application/json", bodyReader) +} + +// NewConfigureIndexRequestWithBody generates requests for ConfigureIndex with any type of body +func NewConfigureIndexRequestWithBody(server string, indexName string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "index_name", runtime.ParamLocationPath, indexName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/indexes/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } + } + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil +} + +// ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface +} + +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, opts...) + if err != nil { + return nil, err + } + return &ClientWithResponses{client}, nil +} + +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil + } +} + +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + // ListCollectionsWithResponse request + ListCollectionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListCollectionsResponse, error) + + // CreateCollectionWithBodyWithResponse request with any body + CreateCollectionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCollectionResponse, error) + + CreateCollectionWithResponse(ctx context.Context, body CreateCollectionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCollectionResponse, error) + + // DeleteCollectionWithResponse request + DeleteCollectionWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*DeleteCollectionResponse, error) + + // DescribeCollectionWithResponse request + DescribeCollectionWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*DescribeCollectionResponse, error) + + // ListIndexesWithResponse request + ListIndexesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListIndexesResponse, error) + + // CreateIndexWithBodyWithResponse request with any body + CreateIndexWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateIndexResponse, error) + + CreateIndexWithResponse(ctx context.Context, body CreateIndexJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateIndexResponse, error) + + // DeleteIndexWithResponse request + DeleteIndexWithResponse(ctx context.Context, indexName string, reqEditors ...RequestEditorFn) (*DeleteIndexResponse, error) + + // DescribeIndexWithResponse request + DescribeIndexWithResponse(ctx context.Context, indexName string, reqEditors ...RequestEditorFn) (*DescribeIndexResponse, error) + + // ConfigureIndexWithBodyWithResponse request with any body + ConfigureIndexWithBodyWithResponse(ctx context.Context, indexName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ConfigureIndexResponse, error) + + ConfigureIndexWithResponse(ctx context.Context, indexName string, body ConfigureIndexJSONRequestBody, reqEditors ...RequestEditorFn) (*ConfigureIndexResponse, error) +} + +type ListCollectionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CollectionList + JSON401 *ErrorResponse + JSON500 *ErrorResponse +} + +// Status returns HTTPResponse.Status +func (r ListCollectionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListCollectionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateCollectionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *CollectionModel + JSON400 *ErrorResponse + JSON401 *ErrorResponse + JSON403 *ErrorResponse + JSON409 *ErrorResponse + JSON422 *ErrorResponse + JSON500 *ErrorResponse +} + +// Status returns HTTPResponse.Status +func (r CreateCollectionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateCollectionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteCollectionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *ErrorResponse + JSON404 *ErrorResponse + JSON500 *ErrorResponse +} + +// Status returns HTTPResponse.Status +func (r DeleteCollectionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteCollectionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DescribeCollectionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CollectionModel + JSON401 *ErrorResponse + JSON404 *ErrorResponse + JSON500 *ErrorResponse +} + +// Status returns HTTPResponse.Status +func (r DescribeCollectionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DescribeCollectionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListIndexesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *IndexList + JSON401 *ErrorResponse + JSON500 *ErrorResponse +} + +// Status returns HTTPResponse.Status +func (r ListIndexesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListIndexesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateIndexResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *IndexModel + JSON400 *ErrorResponse + JSON401 *ErrorResponse + JSON403 *ErrorResponse + JSON404 *ErrorResponse + JSON409 *ErrorResponse + JSON422 *ErrorResponse + JSON500 *ErrorResponse +} + +// Status returns HTTPResponse.Status +func (r CreateIndexResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateIndexResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteIndexResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *ErrorResponse + JSON404 *ErrorResponse + JSON412 *ErrorResponse + JSON500 *ErrorResponse +} + +// Status returns HTTPResponse.Status +func (r DeleteIndexResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteIndexResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DescribeIndexResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *IndexModel + JSON401 *ErrorResponse + JSON404 *ErrorResponse + JSON500 *ErrorResponse +} + +// Status returns HTTPResponse.Status +func (r DescribeIndexResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DescribeIndexResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ConfigureIndexResponse struct { + Body []byte + HTTPResponse *http.Response + JSON202 *IndexModel + JSON400 *ErrorResponse + JSON401 *ErrorResponse + JSON403 *ErrorResponse + JSON404 *ErrorResponse + JSON422 *ErrorResponse + JSON500 *ErrorResponse +} + +// Status returns HTTPResponse.Status +func (r ConfigureIndexResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ConfigureIndexResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ListCollectionsWithResponse request returning *ListCollectionsResponse +func (c *ClientWithResponses) ListCollectionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListCollectionsResponse, error) { + rsp, err := c.ListCollections(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseListCollectionsResponse(rsp) +} + +// CreateCollectionWithBodyWithResponse request with arbitrary body returning *CreateCollectionResponse +func (c *ClientWithResponses) CreateCollectionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCollectionResponse, error) { + rsp, err := c.CreateCollectionWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateCollectionResponse(rsp) +} + +func (c *ClientWithResponses) CreateCollectionWithResponse(ctx context.Context, body CreateCollectionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCollectionResponse, error) { + rsp, err := c.CreateCollection(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateCollectionResponse(rsp) +} + +// DeleteCollectionWithResponse request returning *DeleteCollectionResponse +func (c *ClientWithResponses) DeleteCollectionWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*DeleteCollectionResponse, error) { + rsp, err := c.DeleteCollection(ctx, collectionName, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteCollectionResponse(rsp) +} + +// DescribeCollectionWithResponse request returning *DescribeCollectionResponse +func (c *ClientWithResponses) DescribeCollectionWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*DescribeCollectionResponse, error) { + rsp, err := c.DescribeCollection(ctx, collectionName, reqEditors...) + if err != nil { + return nil, err + } + return ParseDescribeCollectionResponse(rsp) +} + +// ListIndexesWithResponse request returning *ListIndexesResponse +func (c *ClientWithResponses) ListIndexesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListIndexesResponse, error) { + rsp, err := c.ListIndexes(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseListIndexesResponse(rsp) +} + +// CreateIndexWithBodyWithResponse request with arbitrary body returning *CreateIndexResponse +func (c *ClientWithResponses) CreateIndexWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateIndexResponse, error) { + rsp, err := c.CreateIndexWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateIndexResponse(rsp) +} + +func (c *ClientWithResponses) CreateIndexWithResponse(ctx context.Context, body CreateIndexJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateIndexResponse, error) { + rsp, err := c.CreateIndex(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateIndexResponse(rsp) +} + +// DeleteIndexWithResponse request returning *DeleteIndexResponse +func (c *ClientWithResponses) DeleteIndexWithResponse(ctx context.Context, indexName string, reqEditors ...RequestEditorFn) (*DeleteIndexResponse, error) { + rsp, err := c.DeleteIndex(ctx, indexName, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteIndexResponse(rsp) +} + +// DescribeIndexWithResponse request returning *DescribeIndexResponse +func (c *ClientWithResponses) DescribeIndexWithResponse(ctx context.Context, indexName string, reqEditors ...RequestEditorFn) (*DescribeIndexResponse, error) { + rsp, err := c.DescribeIndex(ctx, indexName, reqEditors...) + if err != nil { + return nil, err + } + return ParseDescribeIndexResponse(rsp) +} + +// ConfigureIndexWithBodyWithResponse request with arbitrary body returning *ConfigureIndexResponse +func (c *ClientWithResponses) ConfigureIndexWithBodyWithResponse(ctx context.Context, indexName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ConfigureIndexResponse, error) { + rsp, err := c.ConfigureIndexWithBody(ctx, indexName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseConfigureIndexResponse(rsp) +} + +func (c *ClientWithResponses) ConfigureIndexWithResponse(ctx context.Context, indexName string, body ConfigureIndexJSONRequestBody, reqEditors ...RequestEditorFn) (*ConfigureIndexResponse, error) { + rsp, err := c.ConfigureIndex(ctx, indexName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseConfigureIndexResponse(rsp) +} + +// ParseListCollectionsResponse parses an HTTP response from a ListCollectionsWithResponse call +func ParseListCollectionsResponse(rsp *http.Response) (*ListCollectionsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListCollectionsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CollectionList + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCreateCollectionResponse parses an HTTP response from a CreateCollectionWithResponse call +func ParseCreateCollectionResponse(rsp *http.Response) (*CreateCollectionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateCollectionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest CollectionModel + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON409 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteCollectionResponse parses an HTTP response from a DeleteCollectionWithResponse call +func ParseDeleteCollectionResponse(rsp *http.Response) (*DeleteCollectionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteCollectionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDescribeCollectionResponse parses an HTTP response from a DescribeCollectionWithResponse call +func ParseDescribeCollectionResponse(rsp *http.Response) (*DescribeCollectionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DescribeCollectionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CollectionModel + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseListIndexesResponse parses an HTTP response from a ListIndexesWithResponse call +func ParseListIndexesResponse(rsp *http.Response) (*ListIndexesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListIndexesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest IndexList + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCreateIndexResponse parses an HTTP response from a CreateIndexWithResponse call +func ParseCreateIndexResponse(rsp *http.Response) (*CreateIndexResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateIndexResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest IndexModel + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON409 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteIndexResponse parses an HTTP response from a DeleteIndexWithResponse call +func ParseDeleteIndexResponse(rsp *http.Response) (*DeleteIndexResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteIndexResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 412: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON412 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDescribeIndexResponse parses an HTTP response from a DescribeIndexWithResponse call +func ParseDescribeIndexResponse(rsp *http.Response) (*DescribeIndexResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DescribeIndexResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest IndexModel + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseConfigureIndexResponse parses an HTTP response from a ConfigureIndexWithResponse call +func ParseConfigureIndexResponse(rsp *http.Response) (*ConfigureIndexResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ConfigureIndexResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 202: + var dest IndexModel + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON202 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} diff --git a/internal/gen/inference/2024-10_inference.oas.go b/internal/gen/inference/2024-10_inference.oas.go new file mode 100644 index 0000000..580b724 --- /dev/null +++ b/internal/gen/inference/2024-10_inference.oas.go @@ -0,0 +1,611 @@ +// Package inference provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT. +package inference + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io" + "net/http" + "net/url" + "strings" +) + +const ( + ApiKeyAuthScopes = "ApiKeyAuth.Scopes" +) + +// Defines values for ErrorResponseErrorCode. +const ( + ABORTED ErrorResponseErrorCode = "ABORTED" + ALREADYEXISTS ErrorResponseErrorCode = "ALREADY_EXISTS" + DATALOSS ErrorResponseErrorCode = "DATA_LOSS" + DEADLINEEXCEEDED ErrorResponseErrorCode = "DEADLINE_EXCEEDED" + FAILEDPRECONDITION ErrorResponseErrorCode = "FAILED_PRECONDITION" + FORBIDDEN ErrorResponseErrorCode = "FORBIDDEN" + INTERNAL ErrorResponseErrorCode = "INTERNAL" + INVALIDARGUMENT ErrorResponseErrorCode = "INVALID_ARGUMENT" + NOTFOUND ErrorResponseErrorCode = "NOT_FOUND" + OK ErrorResponseErrorCode = "OK" + OUTOFRANGE ErrorResponseErrorCode = "OUT_OF_RANGE" + PERMISSIONDENIED ErrorResponseErrorCode = "PERMISSION_DENIED" + QUOTAEXCEEDED ErrorResponseErrorCode = "QUOTA_EXCEEDED" + RESOURCEEXHAUSTED ErrorResponseErrorCode = "RESOURCE_EXHAUSTED" + UNAUTHENTICATED ErrorResponseErrorCode = "UNAUTHENTICATED" + UNAVAILABLE ErrorResponseErrorCode = "UNAVAILABLE" + UNIMPLEMENTED ErrorResponseErrorCode = "UNIMPLEMENTED" + UNKNOWN ErrorResponseErrorCode = "UNKNOWN" +) + +// Document Document for reranking +type Document map[string]string + +// EmbedRequest defines model for EmbedRequest. +type EmbedRequest struct { + // Inputs List of inputs to generate embeddings for that varies by model + Inputs []struct { + Text *string `json:"text,omitempty"` + } `json:"inputs"` + + // Model Model name to use for embedding generation. + Model string `json:"model"` + + // Parameters Model-specific parameters. + Parameters *struct { + // InputType Common property used to distinguish between types of data. + InputType *string `json:"input_type,omitempty"` + + // Truncate How to handle inputs longer than those supported by the model. If NONE, when the input exceeds the maximum input token length an error will be returned. + Truncate *string `json:"truncate,omitempty"` + } `json:"parameters,omitempty"` +} + +// Embedding Embedding of a single input +type Embedding struct { + // Values The embedding values. + Values *[]float32 `json:"values,omitempty"` +} + +// EmbeddingsList Embeddings generated for the input +type EmbeddingsList struct { + // Data The embeddings generated for the inputs + Data []Embedding `json:"data"` + + // Model The model used to generate the embeddings + Model string `json:"model"` + + // Usage Usage statistics for model inference including any instruction prefixes + Usage struct { + // TotalTokens Total number tokens consumed across all inputs + TotalTokens *int `json:"total_tokens,omitempty"` + } `json:"usage"` +} + +// ErrorResponse The response shape used for all error responses. +type ErrorResponse struct { + // Error Detailed information about the error that occurred. + Error struct { + Code ErrorResponseErrorCode `json:"code"` + + // Details Additional information about the error. This field is not guaranteed to be present. + Details *map[string]interface{} `json:"details,omitempty"` + Message string `json:"message"` + } `json:"error"` + + // Status The HTTP status code of the error. + Status int `json:"status"` +} + +// ErrorResponseErrorCode defines model for ErrorResponse.Error.Code. +type ErrorResponseErrorCode string + +// RankResult Reranking score of single input +type RankResult struct { + // Document Document for reranking + Document *Document `json:"document,omitempty"` + + // Index The index of the document in the input list + Index int `json:"index"` + + // Score The relevance score of the document normalized between 0 and 1. + Score float32 `json:"score"` +} + +// RerankJSONBody defines parameters for Rerank. +type RerankJSONBody struct { + // Documents The documents to rerank. + Documents []Document `json:"documents"` + + // Model Model to use for reranking. + Model string `json:"model"` + + // Parameters Additional model specific parameters for the reranker. + Parameters *map[string]string `json:"parameters,omitempty"` + + // Query The query to rerank documents against. + Query string `json:"query"` + + // RankFields The fields to rank the documents by. If not provided the default is text. + RankFields *[]string `json:"rank_fields,omitempty"` + + // ReturnDocuments Whether to return the documents in the response. + ReturnDocuments *bool `json:"return_documents,omitempty"` + + // TopN The number of results to return sorted by relevance. Defaults to the number of inputs. + TopN *int `json:"top_n,omitempty"` +} + +// EmbedJSONRequestBody defines body for Embed for application/json ContentType. +type EmbedJSONRequestBody = EmbedRequest + +// RerankJSONRequestBody defines body for Rerank for application/json ContentType. +type RerankJSONRequestBody RerankJSONBody + +// RequestEditorFn is the function signature for the RequestEditor callback function +type RequestEditorFn func(ctx context.Context, req *http.Request) error + +// Doer performs HTTP requests. +// +// The standard http.Client implements this interface. +type HttpRequestDoer interface { + Do(req *http.Request) (*http.Response, error) +} + +// Client which conforms to the OpenAPI3 specification for this service. +type Client struct { + // The endpoint of the server conforming to this interface, with scheme, + // https://api.deepmap.com for example. This can contain a path relative + // to the server, such as https://api.deepmap.com/dev-test, and all the + // paths in the swagger spec will be appended to the server. + Server string + + // Doer for performing requests, typically a *http.Client with any + // customized settings, such as certificate chains. + Client HttpRequestDoer + + // A list of callbacks for modifying requests which are generated before sending over + // the network. + RequestEditors []RequestEditorFn +} + +// ClientOption allows setting custom parameters during construction +type ClientOption func(*Client) error + +// Creates a new Client, with reasonable defaults +func NewClient(server string, opts ...ClientOption) (*Client, error) { + // create a client with sane default values + client := Client{ + Server: server, + } + // mutate client and add all optional params + for _, o := range opts { + if err := o(&client); err != nil { + return nil, err + } + } + // ensure the server URL always has a trailing slash + if !strings.HasSuffix(client.Server, "/") { + client.Server += "/" + } + // create httpClient, if not already present + if client.Client == nil { + client.Client = &http.Client{} + } + return &client, nil +} + +// WithHTTPClient allows overriding the default Doer, which is +// automatically created using http.Client. This is useful for tests. +func WithHTTPClient(doer HttpRequestDoer) ClientOption { + return func(c *Client) error { + c.Client = doer + return nil + } +} + +// WithRequestEditorFn allows setting up a callback function, which will be +// called right before sending the request. This can be used to mutate the request. +func WithRequestEditorFn(fn RequestEditorFn) ClientOption { + return func(c *Client) error { + c.RequestEditors = append(c.RequestEditors, fn) + return nil + } +} + +// The interface specification for the client above. +type ClientInterface interface { + // EmbedWithBody request with any body + EmbedWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + Embed(ctx context.Context, body EmbedJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // RerankWithBody request with any body + RerankWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + Rerank(ctx context.Context, body RerankJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) +} + +func (c *Client) EmbedWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewEmbedRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) Embed(ctx context.Context, body EmbedJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewEmbedRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) RerankWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewRerankRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) Rerank(ctx context.Context, body RerankJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewRerankRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +// NewEmbedRequest calls the generic Embed builder with application/json body +func NewEmbedRequest(server string, body EmbedJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewEmbedRequestWithBody(server, "application/json", bodyReader) +} + +// NewEmbedRequestWithBody generates requests for Embed with any type of body +func NewEmbedRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/embed") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewRerankRequest calls the generic Rerank builder with application/json body +func NewRerankRequest(server string, body RerankJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewRerankRequestWithBody(server, "application/json", bodyReader) +} + +// NewRerankRequestWithBody generates requests for Rerank with any type of body +func NewRerankRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/rerank") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } + } + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil +} + +// ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface +} + +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, opts...) + if err != nil { + return nil, err + } + return &ClientWithResponses{client}, nil +} + +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil + } +} + +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + // EmbedWithBodyWithResponse request with any body + EmbedWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmbedResponse, error) + + EmbedWithResponse(ctx context.Context, body EmbedJSONRequestBody, reqEditors ...RequestEditorFn) (*EmbedResponse, error) + + // RerankWithBodyWithResponse request with any body + RerankWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RerankResponse, error) + + RerankWithResponse(ctx context.Context, body RerankJSONRequestBody, reqEditors ...RequestEditorFn) (*RerankResponse, error) +} + +type EmbedResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *EmbeddingsList + JSON400 *ErrorResponse + JSON401 *ErrorResponse + JSON500 *ErrorResponse +} + +// Status returns HTTPResponse.Status +func (r EmbedResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r EmbedResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type RerankResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // Data The reranked documents + Data []RankResult `json:"data"` + + // Model The model used for reranking + Model string `json:"model"` + + // Usage Usage statistics for the inference + Usage struct { + RerankUnits *int `json:"rerank_units,omitempty"` + } `json:"usage"` + } + JSON400 *ErrorResponse + JSON401 *ErrorResponse + JSON500 *ErrorResponse +} + +// Status returns HTTPResponse.Status +func (r RerankResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r RerankResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// EmbedWithBodyWithResponse request with arbitrary body returning *EmbedResponse +func (c *ClientWithResponses) EmbedWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmbedResponse, error) { + rsp, err := c.EmbedWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseEmbedResponse(rsp) +} + +func (c *ClientWithResponses) EmbedWithResponse(ctx context.Context, body EmbedJSONRequestBody, reqEditors ...RequestEditorFn) (*EmbedResponse, error) { + rsp, err := c.Embed(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseEmbedResponse(rsp) +} + +// RerankWithBodyWithResponse request with arbitrary body returning *RerankResponse +func (c *ClientWithResponses) RerankWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RerankResponse, error) { + rsp, err := c.RerankWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseRerankResponse(rsp) +} + +func (c *ClientWithResponses) RerankWithResponse(ctx context.Context, body RerankJSONRequestBody, reqEditors ...RequestEditorFn) (*RerankResponse, error) { + rsp, err := c.Rerank(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseRerankResponse(rsp) +} + +// ParseEmbedResponse parses an HTTP response from a EmbedWithResponse call +func ParseEmbedResponse(rsp *http.Response) (*EmbedResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &EmbedResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest EmbeddingsList + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseRerankResponse parses an HTTP response from a RerankWithResponse call +func ParseRerankResponse(rsp *http.Response) (*RerankResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &RerankResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Data The reranked documents + Data []RankResult `json:"data"` + + // Model The model used for reranking + Model string `json:"model"` + + // Usage Usage statistics for the inference + Usage struct { + RerankUnits *int `json:"rerank_units,omitempty"` + } `json:"usage"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest ErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} diff --git a/internal/provider/header.go b/internal/provider/header.go index 7c880e7..0a63d25 100644 --- a/internal/provider/header.go +++ b/internal/provider/header.go @@ -5,16 +5,16 @@ import ( "net/http" ) -type customHeader struct { +type CustomHeader struct { name string value string } -func NewHeaderProvider(name string, value string) *customHeader { - return &customHeader{name: name, value: value} +func NewHeaderProvider(name string, value string) *CustomHeader { + return &CustomHeader{name: name, value: value} } -func (h *customHeader) Intercept(ctx context.Context, req *http.Request) error { +func (h *CustomHeader) Intercept(ctx context.Context, req *http.Request) error { req.Header.Set(h.name, h.value) return nil } diff --git a/justfile b/justfile index 0bdc7e4..db8a291 100644 --- a/justfile +++ b/justfile @@ -1,4 +1,4 @@ -api_version := "2024-07" +api_version := "2024-10" test: #!/usr/bin/env bash diff --git a/pinecone/client.go b/pinecone/client.go index 261abba..72ce15a 100644 --- a/pinecone/client.go +++ b/pinecone/client.go @@ -15,7 +15,8 @@ import ( "strings" "github.com/pinecone-io/go-pinecone/internal/gen" - "github.com/pinecone-io/go-pinecone/internal/gen/control" + "github.com/pinecone-io/go-pinecone/internal/gen/db_control" + "github.com/pinecone-io/go-pinecone/internal/gen/inference" "github.com/pinecone-io/go-pinecone/internal/provider" "github.com/pinecone-io/go-pinecone/internal/useragent" "google.golang.org/grpc" @@ -72,7 +73,7 @@ import ( type Client struct { Inference *InferenceService headers map[string]string - restClient *control.Client + restClient *db_control.Client sourceTag string } @@ -210,6 +211,7 @@ func NewClient(in NewClientParams) (*Client, error) { // } func NewClientBase(in NewClientBaseParams) (*Client, error) { clientOptions := buildClientBaseOptions(in) + inference_client_options := buildInferenceBaseOptions(in) var err error controlHostOverride := valueOrFallback(in.Host, os.Getenv("PINECONE_CONTROLLER_HOST")) @@ -220,12 +222,16 @@ func NewClientBase(in NewClientBaseParams) (*Client, error) { } } - client, err := control.NewClient(valueOrFallback(controlHostOverride, "https://api.pinecone.io"), clientOptions...) + db_control_client, err := db_control.NewClient(valueOrFallback(controlHostOverride, "https://api.pinecone.io"), clientOptions...) + if err != nil { + return nil, err + } + inference_client, err := inference.NewClient(valueOrFallback(controlHostOverride, "https://api.pinecone.io"), inference_client_options...) if err != nil { return nil, err } - c := Client{Inference: &InferenceService{client: client}, restClient: client, sourceTag: in.SourceTag, headers: in.Headers} + c := Client{Inference: &InferenceService{client: inference_client}, restClient: db_control_client, sourceTag: in.SourceTag, headers: in.Headers} return &c, nil } @@ -354,7 +360,7 @@ func (c *Client) ListIndexes(ctx context.Context) ([]*Index, error) { return nil, handleErrorResponseBody(res, "failed to list indexes: ") } - var indexList control.IndexList + var indexList db_control.IndexList err = json.NewDecoder(res.Body).Decode(&indexList) if err != nil { return nil, err @@ -518,18 +524,18 @@ func (c *Client) CreatePodIndex(ctx context.Context, in *CreatePodIndexRequest) return nil, fmt.Errorf("fields Name, Dimension, Metric, Environment, and Podtype must be included in CreatePodIndexRequest") } - deletionProtection := pointerOrNil(control.DeletionProtection(in.DeletionProtection)) - metric := pointerOrNil(control.CreateIndexRequestMetric(in.Metric)) + deletionProtection := pointerOrNil(db_control.DeletionProtection(in.DeletionProtection)) + metric := pointerOrNil(db_control.CreateIndexRequestMetric(in.Metric)) - req := control.CreateIndexRequest{ + req := db_control.CreateIndexRequest{ Name: in.Name, Dimension: in.Dimension, Metric: metric, DeletionProtection: deletionProtection, } - req.Spec = control.IndexSpec{ - Pod: &control.PodSpec{ + req.Spec = db_control.IndexSpec{ + Pod: &db_control.PodSpec{ Environment: in.Environment, PodType: in.PodType, Pods: in.TotalCount(), @@ -668,17 +674,17 @@ func (c *Client) CreateServerlessIndex(ctx context.Context, in *CreateServerless return nil, fmt.Errorf("fields Name, Dimension, Metric, Cloud, and Region must be included in CreateServerlessIndexRequest") } - deletionProtection := pointerOrNil(control.DeletionProtection(in.DeletionProtection)) - metric := pointerOrNil(control.CreateIndexRequestMetric(in.Metric)) + deletionProtection := pointerOrNil(db_control.DeletionProtection(in.DeletionProtection)) + metric := pointerOrNil(db_control.CreateIndexRequestMetric(in.Metric)) - req := control.CreateIndexRequest{ + req := db_control.CreateIndexRequest{ Name: in.Name, Dimension: in.Dimension, Metric: metric, DeletionProtection: deletionProtection, - Spec: control.IndexSpec{ - Serverless: &control.ServerlessSpec{ - Cloud: control.ServerlessSpecCloud(in.Cloud), + Spec: db_control.IndexSpec{ + Serverless: &db_control.ServerlessSpec{ + Cloud: db_control.ServerlessSpecCloud(in.Cloud), Region: in.Region, }, }, @@ -889,7 +895,7 @@ func (c *Client) ConfigureIndex(ctx context.Context, name string, in ConfigureIn replicas := pointerOrNil(in.Replicas) deletionProtection := pointerOrNil(in.DeletionProtection) - var request control.ConfigureIndexRequest + var request db_control.ConfigureIndexRequest if podType != nil || replicas != nil { request.Spec = &struct { @@ -907,7 +913,7 @@ func (c *Client) ConfigureIndex(ctx context.Context, name string, in ConfigureIn }, } } - request.DeletionProtection = (*control.DeletionProtection)(deletionProtection) + request.DeletionProtection = (*db_control.DeletionProtection)(deletionProtection) res, err := c.restClient.ConfigureIndex(ctx, name, request) if err != nil { @@ -976,7 +982,7 @@ func (c *Client) ListCollections(ctx context.Context) ([]*Collection, error) { return nil, handleErrorResponseBody(res, "failed to list collections: ") } - var collectionsResponse control.CollectionList + var collectionsResponse db_control.CollectionList if err := json.NewDecoder(res.Body).Decode(&collectionsResponse); err != nil { return nil, err } @@ -1132,7 +1138,7 @@ func (c *Client) CreateCollection(ctx context.Context, in *CreateCollectionReque return nil, fmt.Errorf("fields Name and Source must be included in CreateCollectionRequest") } - req := control.CreateCollectionRequest{ + req := db_control.CreateCollectionRequest{ Name: in.Name, Source: in.Source, } @@ -1229,7 +1235,7 @@ type EmbedParameters struct { // // [Pinecone Inference API]: https://docs.pinecone.io/guides/inference/understanding-inference#embedding-models type InferenceService struct { - client *control.Client + client *inference.Client } // Embed generates embeddings for a list of inputs using the specified model and (optional) parameters. @@ -1274,7 +1280,7 @@ type InferenceService struct { // } else { // fmt.Printf("Successfull generated embeddings: %+v", res) // } -func (i *InferenceService) Embed(ctx context.Context, in *EmbedRequest) (*control.EmbeddingsList, error) { +func (i *InferenceService) Embed(ctx context.Context, in *EmbedRequest) (*inference.EmbeddingsList, error) { if len(in.TextInputs) == 0 { return nil, fmt.Errorf("TextInputs must contain at least one value") @@ -1290,7 +1296,7 @@ func (i *InferenceService) Embed(ctx context.Context, in *EmbedRequest) (*contro }{Text: &input} } - req := control.EmbedRequest{ + req := inference.EmbedRequest{ Model: in.Model, Inputs: convertedInputs, } @@ -1337,7 +1343,7 @@ func (c *Client) extractAuthHeader() map[string]string { return nil } -func toIndex(idx *control.IndexModel) *Index { +func toIndex(idx *db_control.IndexModel) *Index { if idx == nil { return nil } @@ -1380,7 +1386,7 @@ func toIndex(idx *control.IndexModel) *Index { } func decodeIndex(resBody io.ReadCloser) (*Index, error) { - var idx control.IndexModel + var idx db_control.IndexModel err := json.NewDecoder(resBody).Decode(&idx) if err != nil { return nil, fmt.Errorf("failed to decode idx response: %w", err) @@ -1389,8 +1395,8 @@ func decodeIndex(resBody io.ReadCloser) (*Index, error) { return toIndex(&idx), nil } -func decodeEmbeddingsList(resBody io.ReadCloser) (*control.EmbeddingsList, error) { - var embeddingsList control.EmbeddingsList +func decodeEmbeddingsList(resBody io.ReadCloser) (*inference.EmbeddingsList, error) { + var embeddingsList inference.EmbeddingsList err := json.NewDecoder(resBody).Decode(&embeddingsList) if err != nil { return nil, fmt.Errorf("failed to decode embeddings response: %w", err) @@ -1399,7 +1405,7 @@ func decodeEmbeddingsList(resBody io.ReadCloser) (*control.EmbeddingsList, error return &embeddingsList, nil } -func toCollection(cm *control.CollectionModel) *Collection { +func toCollection(cm *db_control.CollectionModel) *Collection { if cm == nil { return nil } @@ -1415,7 +1421,7 @@ func toCollection(cm *control.CollectionModel) *Collection { } func decodeCollection(resBody io.ReadCloser) (*Collection, error) { - var collectionModel control.CollectionModel + var collectionModel db_control.CollectionModel err := json.NewDecoder(resBody).Decode(&collectionModel) if err != nil { return nil, fmt.Errorf("failed to decode collection response: %w", err) @@ -1424,8 +1430,8 @@ func decodeCollection(resBody io.ReadCloser) (*Collection, error) { return toCollection(&collectionModel), nil } -func decodeErrorResponse(resBodyBytes []byte) (*control.ErrorResponse, error) { - var errorResponse control.ErrorResponse +func decodeErrorResponse(resBodyBytes []byte) (*db_control.ErrorResponse, error) { + var errorResponse db_control.ErrorResponse err := json.Unmarshal(resBodyBytes, &errorResponse) if err != nil { return nil, fmt.Errorf("failed to decode error response: %w", err) @@ -1487,16 +1493,45 @@ func formatError(errMap errorResponseMap) error { return &PineconeError{Code: errMap.StatusCode, Msg: baseError} } -func buildClientBaseOptions(in NewClientBaseParams) []control.ClientOption { - clientOptions := []control.ClientOption{} +func buildClientBaseOptions(in NewClientBaseParams) []db_control.ClientOption { + clientOptions := []db_control.ClientOption{} + headerProviders := buildSharedProviderHeaders(in) - // build and apply user agent header - userAgentProvider := provider.NewHeaderProvider("User-Agent", useragent.BuildUserAgent(in.SourceTag)) - clientOptions = append(clientOptions, control.WithRequestEditorFn(userAgentProvider.Intercept)) + for _, provider := range headerProviders { + clientOptions = append(clientOptions, db_control.WithRequestEditorFn(provider.Intercept)) + } + + // apply custom http client if provided + if in.RestClient != nil { + clientOptions = append(clientOptions, db_control.WithHTTPClient(in.RestClient)) + } + + return clientOptions +} +func buildInferenceBaseOptions(in NewClientBaseParams) []inference.ClientOption { + clientOptions := []inference.ClientOption{} + headerProviders := buildSharedProviderHeaders(in) + + for _, provider := range headerProviders { + clientOptions = append(clientOptions, inference.WithRequestEditorFn(provider.Intercept)) + } + + // apply custom http client if provided + if in.RestClient != nil { + clientOptions = append(clientOptions, inference.WithHTTPClient(in.RestClient)) + } + + return clientOptions +} + +func buildSharedProviderHeaders(in NewClientBaseParams) []*provider.CustomHeader { + providers := []*provider.CustomHeader{} + + // build and apply user agent header + providers = append(providers, provider.NewHeaderProvider("User-Agent", useragent.BuildUserAgent(in.SourceTag))) // build and apply api version header - apiVersionProvider := provider.NewHeaderProvider("X-Pinecone-Api-Version", gen.PineconeApiVersion) - clientOptions = append(clientOptions, control.WithRequestEditorFn(apiVersionProvider.Intercept)) + providers = append(providers, provider.NewHeaderProvider("X-Pinecone-Api-Version", gen.PineconeApiVersion)) // get headers from environment envAdditionalHeaders, hasEnvAdditionalHeaders := os.LookupEnv("PINECONE_ADDITIONAL_HEADERS") @@ -1507,26 +1542,18 @@ func buildClientBaseOptions(in NewClientBaseParams) []control.ClientOption { log.Printf("failed to parse PINECONE_ADDITIONAL_HEADERS: %v", err) } } - // merge headers from parameters if passed with additionalHeaders from environment if in.Headers != nil { for key, value := range in.Headers { additionalHeaders[key] = value } } - - // add headers to client options + // create header providers for key, value := range additionalHeaders { - headerProvider := provider.NewHeaderProvider(key, value) - clientOptions = append(clientOptions, control.WithRequestEditorFn(headerProvider.Intercept)) + providers = append(providers, provider.NewHeaderProvider(key, value)) } - // apply custom http client if provided - if in.RestClient != nil { - clientOptions = append(clientOptions, control.WithHTTPClient(in.RestClient)) - } - - return clientOptions + return providers } func ensureURLScheme(inputURL string) (string, error) { diff --git a/pinecone/client_test.go b/pinecone/client_test.go index de27d83..17200e1 100644 --- a/pinecone/client_test.go +++ b/pinecone/client_test.go @@ -14,7 +14,7 @@ import ( "github.com/google/go-cmp/cmp" "github.com/pinecone-io/go-pinecone/internal/gen" - "github.com/pinecone-io/go-pinecone/internal/gen/control" + "github.com/pinecone-io/go-pinecone/internal/gen/db_control" "github.com/pinecone-io/go-pinecone/internal/provider" "github.com/google/uuid" @@ -293,9 +293,9 @@ func (ts *IntegrationTests) TestGenerateEmbeddings() { require.NoError(ts.T(), err) require.NotNil(ts.T(), embeddings, "Expected embedding to be non-nil") - require.Equal(ts.T(), embeddingModel, *embeddings.Model, "Expected model to be '%s', but got '%s'", embeddingModel, embeddings.Model) - require.Equal(ts.T(), 2, len(*embeddings.Data), "Expected 2 embeddings") - require.Equal(ts.T(), 1024, len(*(*embeddings.Data)[0].Values), "Expected embeddings to have length 1024") + require.Equal(ts.T(), embeddingModel, embeddings.Model, "Expected model to be '%s', but got '%s'", embeddingModel, embeddings.Model) + require.Equal(ts.T(), 2, len(embeddings.Data), "Expected 2 embeddings") + require.Equal(ts.T(), 1024, len(*embeddings.Data[0].Values), "Expected embeddings to have length 1024") } func (ts *IntegrationTests) TestGenerateEmbeddingsInvalidInputs() { @@ -806,12 +806,12 @@ func TestEnsureURLSchemeUnit(t *testing.T) { } func TestToIndexUnit(t *testing.T) { - deletionProtectionEnabled := control.Enabled - deletionProtectionDisabled := control.Disabled + deletionProtectionEnabled := db_control.Enabled + deletionProtectionDisabled := db_control.Disabled tests := []struct { name string - originalInput *control.IndexModel + originalInput *db_control.IndexModel expectedOutput *Index }{ { @@ -821,19 +821,19 @@ func TestToIndexUnit(t *testing.T) { }, { name: "pod index input", - originalInput: &control.IndexModel{ + originalInput: &db_control.IndexModel{ Name: "testIndex", Dimension: 128, Host: "test-host", Metric: "cosine", DeletionProtection: &deletionProtectionDisabled, Spec: struct { - Pod *control.PodSpec `json:"pod,omitempty"` - Serverless *control.ServerlessSpec `json:"serverless,omitempty"` + Pod *db_control.PodSpec `json:"pod,omitempty"` + Serverless *db_control.ServerlessSpec `json:"serverless,omitempty"` }(struct { - Pod *control.PodSpec - Serverless *control.ServerlessSpec - }{Pod: &control.PodSpec{ + Pod *db_control.PodSpec + Serverless *db_control.ServerlessSpec + }{Pod: &db_control.PodSpec{ Environment: "test-environ", PodType: "p1.x2", Pods: 1, @@ -843,8 +843,8 @@ func TestToIndexUnit(t *testing.T) { MetadataConfig: nil, }}), Status: struct { - Ready bool `json:"ready"` - State control.IndexModelStatusState `json:"state"` + Ready bool `json:"ready"` + State db_control.IndexModelStatusState `json:"state"` }{ Ready: true, State: "active", @@ -874,25 +874,25 @@ func TestToIndexUnit(t *testing.T) { }, { name: "serverless index input", - originalInput: &control.IndexModel{ + originalInput: &db_control.IndexModel{ Name: "testIndex", Dimension: 128, Host: "test-host", Metric: "cosine", DeletionProtection: &deletionProtectionEnabled, Spec: struct { - Pod *control.PodSpec `json:"pod,omitempty"` - Serverless *control.ServerlessSpec `json:"serverless,omitempty"` + Pod *db_control.PodSpec `json:"pod,omitempty"` + Serverless *db_control.ServerlessSpec `json:"serverless,omitempty"` }(struct { - Pod *control.PodSpec - Serverless *control.ServerlessSpec - }{Serverless: &control.ServerlessSpec{ + Pod *db_control.PodSpec + Serverless *db_control.ServerlessSpec + }{Serverless: &db_control.ServerlessSpec{ Cloud: "test-environ", Region: "test-region", }}), Status: struct { - Ready bool `json:"ready"` - State control.IndexModelStatusState `json:"state"` + Ready bool `json:"ready"` + State db_control.IndexModelStatusState `json:"state"` }{ Ready: true, State: "active", @@ -936,7 +936,7 @@ func TestToCollectionUnit(t *testing.T) { tests := []struct { name string - originalInput *control.CollectionModel + originalInput *db_control.CollectionModel expectedOutput *Collection }{ { @@ -946,7 +946,7 @@ func TestToCollectionUnit(t *testing.T) { }, { name: "collection input", - originalInput: &control.CollectionModel{ + originalInput: &db_control.CollectionModel{ Dimension: &dimension, Name: "testCollection", Environment: "test-environ", @@ -965,7 +965,7 @@ func TestToCollectionUnit(t *testing.T) { }, { name: "collection input", - originalInput: &control.CollectionModel{ + originalInput: &db_control.CollectionModel{ Dimension: &dimension, Name: "testCollection", Environment: "test-environ", @@ -1149,7 +1149,7 @@ func TestBuildClientBaseOptionsUnit(t *testing.T) { name string params NewClientBaseParams envHeaders string - expect []control.ClientOption + expect []db_control.ClientOption expectEnvUnset bool }{ { @@ -1158,10 +1158,10 @@ func TestBuildClientBaseOptionsUnit(t *testing.T) { SourceTag: "source-tag", Headers: map[string]string{"Param-Header": "param-value"}, }, - expect: []control.ClientOption{ - control.WithRequestEditorFn(provider.NewHeaderProvider("User-Agent", "test-user-agent").Intercept), - control.WithRequestEditorFn(provider.NewHeaderProvider("X-Pinecone-Api-Version", gen.PineconeApiVersion).Intercept), - control.WithRequestEditorFn(provider.NewHeaderProvider("Param-Header", "param-value").Intercept), + expect: []db_control.ClientOption{ + db_control.WithRequestEditorFn(provider.NewHeaderProvider("User-Agent", "test-user-agent").Intercept), + db_control.WithRequestEditorFn(provider.NewHeaderProvider("X-Pinecone-Api-Version", gen.PineconeApiVersion).Intercept), + db_control.WithRequestEditorFn(provider.NewHeaderProvider("Param-Header", "param-value").Intercept), }, expectEnvUnset: true, }, @@ -1172,11 +1172,11 @@ func TestBuildClientBaseOptionsUnit(t *testing.T) { Headers: map[string]string{"Param-Header": "param-value"}, }, envHeaders: `{"Env-Header": "env-value"}`, - expect: []control.ClientOption{ - control.WithRequestEditorFn(provider.NewHeaderProvider("Env-Header", "env-value").Intercept), - control.WithRequestEditorFn(provider.NewHeaderProvider("X-Pinecone-Api-Version", gen.PineconeApiVersion).Intercept), - control.WithRequestEditorFn(provider.NewHeaderProvider("User-Agent", "test-user-agent").Intercept), - control.WithRequestEditorFn(provider.NewHeaderProvider("Param-Header", "param-value").Intercept), + expect: []db_control.ClientOption{ + db_control.WithRequestEditorFn(provider.NewHeaderProvider("Env-Header", "env-value").Intercept), + db_control.WithRequestEditorFn(provider.NewHeaderProvider("X-Pinecone-Api-Version", gen.PineconeApiVersion).Intercept), + db_control.WithRequestEditorFn(provider.NewHeaderProvider("User-Agent", "test-user-agent").Intercept), + db_control.WithRequestEditorFn(provider.NewHeaderProvider("Param-Header", "param-value").Intercept), }, }, } From 5c3eb043683e1c71510c2c76e2d44bf3ca58c5e2 Mon Sep 17 00:00:00 2001 From: Austin DeNoble Date: Sat, 14 Sep 2024 00:27:32 -0400 Subject: [PATCH 2/4] clean up naming, use module_version all over --- codegen/build-clients.sh | 4 ++-- .../{control_plane.oas.go => db_control_2024-10.oas.go} | 0 .../{2024-10_inference.oas.go => inference_2024-10.oas.go} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename internal/gen/db_control/{control_plane.oas.go => db_control_2024-10.oas.go} (100%) rename internal/gen/inference/{2024-10_inference.oas.go => inference_2024-10.oas.go} (100%) diff --git a/codegen/build-clients.sh b/codegen/build-clients.sh index 223b3a1..0c45f5a 100755 --- a/codegen/build-clients.sh +++ b/codegen/build-clients.sh @@ -17,8 +17,8 @@ inference_destination="internal/gen/${inference_module}" # version file version_file="internal/gen/api_version.go" # generated oas files -db_control_oas_file="${db_control_destination}/control_plane.oas.go" -inference_oas_file="${inference_destination}/${version}_${inference_module}.oas.go" +db_control_oas_file="${db_control_destination}/${db_control_module}_${version}.oas.go" +inference_oas_file="${inference_destination}/${inference_module}_${version}.oas.go" set -eux -o pipefail diff --git a/internal/gen/db_control/control_plane.oas.go b/internal/gen/db_control/db_control_2024-10.oas.go similarity index 100% rename from internal/gen/db_control/control_plane.oas.go rename to internal/gen/db_control/db_control_2024-10.oas.go diff --git a/internal/gen/inference/2024-10_inference.oas.go b/internal/gen/inference/inference_2024-10.oas.go similarity index 100% rename from internal/gen/inference/2024-10_inference.oas.go rename to internal/gen/inference/inference_2024-10.oas.go From 7dd446bfb14a2900cc7184542c4a79a921d8b3b4 Mon Sep 17 00:00:00 2001 From: Austin DeNoble Date: Sat, 14 Sep 2024 00:30:46 -0400 Subject: [PATCH 3/4] run ci workflow on all prs --- .github/workflows/ci.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ea5f5d3..f6a2e9f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,8 +1,6 @@ name: ci on: - pull_request: - branches: - - main + pull_request: {} jobs: build: From ec0b31cd15e29b5909a05f82a9939ba5d5bf8960 Mon Sep 17 00:00:00 2001 From: Austin DeNoble Date: Mon, 16 Sep 2024 13:13:31 -0400 Subject: [PATCH 4/4] update submodule reference --- codegen/apis | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codegen/apis b/codegen/apis index d1d005e..3b7369b 160000 --- a/codegen/apis +++ b/codegen/apis @@ -1 +1 @@ -Subproject commit d1d005e75cc9fe9a5c486ef9218fe87b57765961 +Subproject commit 3b7369b89469ddc6ef4c08d3f8df905302966624