use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, bon::Builder)]
pub struct UpdateVectorStoreFileAttributesRequest {
#[serde(rename = "attributes", deserialize_with = "Option::deserialize")]
pub attributes:
Option<std::collections::HashMap<String, models::VectorStoreFileAttributesValue>>,
}
impl UpdateVectorStoreFileAttributesRequest {
pub fn new(
attributes: Option<
std::collections::HashMap<String, models::VectorStoreFileAttributesValue>,
>,
) -> UpdateVectorStoreFileAttributesRequest {
UpdateVectorStoreFileAttributesRequest { attributes }
}
}
impl std::fmt::Display for UpdateVectorStoreFileAttributesRequest {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match serde_json::to_string(self) {
Ok(s) => write!(f, "{}", s),
Err(_) => Err(std::fmt::Error),
}
}
}