pinecone_sdk/openapi/models/index_spec.rs
1/*
2 * Pinecone Control Plane API
3 *
4 * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors.
5 *
6 * The version of the OpenAPI document: 2024-07
7 * Contact: support@pinecone.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::openapi::models;
12use serde::{Deserialize, Serialize};
13
14/// 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.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct IndexSpec {
17 #[serde(rename = "serverless", skip_serializing_if = "Option::is_none")]
18 pub serverless: Option<Box<models::ServerlessSpec>>,
19 #[serde(rename = "pod", skip_serializing_if = "Option::is_none")]
20 pub pod: Option<Box<models::PodSpec>>,
21}
22
23impl IndexSpec {
24 /// 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.
25 pub fn new() -> IndexSpec {
26 IndexSpec {
27 serverless: None,
28 pod: None,
29 }
30 }
31}
32