pub struct DocumentUrlUploadDetail {
pub url: String,
pub knowledge_type: DocumentSliceType,
pub custom_separator: Option<Vec<String>>,
pub sentence_size: Option<u32>,
pub callback_url: Option<String>,
pub callback_header: Option<BTreeMap<String, String>>,
}Expand description
Single URL upload detail
Fields§
§url: StringSource URL to fetch
knowledge_type: DocumentSliceTypeSlice type (1, 2, 3, 5, 6, or 7).
custom_separator: Option<Vec<String>>Custom separators
sentence_size: Option<u32>Custom slice size (20..=2000).
callback_url: Option<String>Callback URL
callback_header: Option<BTreeMap<String, String>>Callback headers
Implementations§
Source§impl DocumentUrlUploadDetail
impl DocumentUrlUploadDetail
Sourcepub fn new(url: impl Into<String>) -> Self
pub fn new(url: impl Into<String>) -> Self
Create a new upload detail for the given source URL.
Sourcepub fn with_knowledge_type(self, value: DocumentSliceType) -> Self
pub fn with_knowledge_type(self, value: DocumentSliceType) -> Self
Set the slice/knowledge type.
Sourcepub fn with_custom_separator(self, seps: Vec<String>) -> Self
pub fn with_custom_separator(self, seps: Vec<String>) -> Self
Set custom separators.
Sourcepub fn with_sentence_size(self, size: u32) -> Self
pub fn with_sentence_size(self, size: u32) -> Self
Set the sentence size.
Sourcepub fn with_callback_url(self, url: impl Into<String>) -> Self
pub fn with_callback_url(self, url: impl Into<String>) -> Self
Set the callback URL.
Sourcepub fn with_callback_header(self, headers: BTreeMap<String, String>) -> Self
pub fn with_callback_header(self, headers: BTreeMap<String, String>) -> Self
Set the callback headers.
Trait Implementations§
Source§impl Clone for DocumentUrlUploadDetail
impl Clone for DocumentUrlUploadDetail
Source§fn clone(&self) -> DocumentUrlUploadDetail
fn clone(&self) -> DocumentUrlUploadDetail
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DocumentUrlUploadDetail
impl Debug for DocumentUrlUploadDetail
Source§impl<'de> Deserialize<'de> for DocumentUrlUploadDetail
impl<'de> Deserialize<'de> for DocumentUrlUploadDetail
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for DocumentUrlUploadDetail
impl Serialize for DocumentUrlUploadDetail
Source§impl Validate for DocumentUrlUploadDetail
impl Validate for DocumentUrlUploadDetail
Source§impl<'v_a> ValidateArgs<'v_a> for DocumentUrlUploadDetail
impl<'v_a> ValidateArgs<'v_a> for DocumentUrlUploadDetail
Auto Trait Implementations§
impl Freeze for DocumentUrlUploadDetail
impl RefUnwindSafe for DocumentUrlUploadDetail
impl Send for DocumentUrlUploadDetail
impl Sync for DocumentUrlUploadDetail
impl Unpin for DocumentUrlUploadDetail
impl UnsafeUnpin for DocumentUrlUploadDetail
impl UnwindSafe for DocumentUrlUploadDetail
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more