autogen-stedi 0.3.2

Auto-generated, strongly-typed Rust client for the Stedi APIs
Documentation
/*
 * Stedi Payers
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 2024-04-01
 * Contact: healthcare@stedi.com
 * Generated by: https://openapi-generator.tech
 */

use crate::payers::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SearchResult {
    /// Shows which properties in the payer record match the search query. This information helps you understand why Stedi returned this payer and which parts of the payer record matched the search terms. It's also especially useful for debugging search queries and building user interfaces that display matching text. - Matching text is wrapped in `<b>` HTML tags for highlighting. - This object only contains properties with matching text. For example, if none of the payer's aliases matched the search query, this object will not include the `aliases` property.
    #[serde(rename = "matches", skip_serializing_if = "Option::is_none")]
    pub matches: Option<Box<models::Matches>>,
    /// A payer record matching the search query.
    #[serde(rename = "payer")]
    pub payer: Box<models::SearchPayerRecord>,
    /// A relevance score indicating how well this payer matched the search query. Higher scores are better matches. The minimum score is 0.
    #[serde(rename = "score")]
    pub score: f64,
}

impl SearchResult {
    pub fn new(payer: models::SearchPayerRecord, score: f64) -> SearchResult {
        SearchResult {
            matches: None,
            payer: Box::new(payer),
            score,
        }
    }
}