/*
* Pinecone Control Plane API
*
* Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors.
*
* The version of the OpenAPI document: 2024-07
* Contact: support@pinecone.io
* Generated by: https://openapi-generator.tech
*/
use crate::openapi::models;
use serde::{Deserialize, Serialize};
/// CreateCollectionRequest : The configuration needed to create a Pinecone collection.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateCollectionRequest {
/// 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 '-'.
#[serde(rename = "name")]
pub name: String,
/// The name of the index to be used as the source for the collection.
#[serde(rename = "source")]
pub source: String,
}
impl CreateCollectionRequest {
/// The configuration needed to create a Pinecone collection.
pub fn new(name: String, source: String) -> CreateCollectionRequest {
CreateCollectionRequest {
name,
source,
}
}
}