use crate::blobs::Blob;
#[cfg(feature = "fp-bindgen")]
use fp_bindgen::prelude::Serializable;
use serde::{Deserialize, Serialize};
use typed_builder::TypedBuilder;
pub type ProviderConfig = serde_json::Value;
#[derive(Debug, Deserialize, Serialize, TypedBuilder)]
#[cfg_attr(
feature = "fp-bindgen",
derive(Serializable),
fp(rust_module = "fiberplane_models::providers")
)]
#[non_exhaustive]
#[serde(rename_all = "camelCase")]
pub struct ProviderRequest {
#[builder(setter(into))]
pub query_type: String,
#[builder(setter(into))]
pub query_data: Blob,
pub config: ProviderConfig,
#[builder(default, setter(into, strip_option))]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub previous_response: Option<Blob>,
}