pinecone_sdk/openapi/models/deletion_protection.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/// DeletionProtection : Whether [deletion protection](http://docs.pinecone.io/guides/indexes/prevent-index-deletion) is enabled/disabled for the index.
15/// Whether [deletion protection](http://docs.pinecone.io/guides/indexes/prevent-index-deletion) is enabled/disabled for the index.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum DeletionProtection {
18 #[serde(rename = "disabled")]
19 Disabled,
20 #[serde(rename = "enabled")]
21 Enabled,
22
23}
24
25impl std::fmt::Display for DeletionProtection {
26 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
27 match self {
28 Self::Disabled => write!(f, "disabled"),
29 Self::Enabled => write!(f, "enabled"),
30 }
31 }
32}
33
34impl Default for DeletionProtection {
35 fn default() -> DeletionProtection {
36 Self::Disabled
37 }
38}
39