geoprox-client 0.5.0

An HTTP client library for interacting with the Geoprox search engine
Documentation
/*
 * geoprox-server
 *
 * Geoprox server implementation providing a HTTP API for geospatial queries and position tracking
 *
 * The version of the OpenAPI document: 0.5.0
 * Contact: singhezra@gmail.com
 * Generated by: https://openapi-generator.tech
 */

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

/// InsertKeyBatchResponse : Returns results and errors of batch key insert
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct InsertKeyBatchResponse {
    /// Contains information about which keys failed to be inserted and the associated error details.
    #[serde(rename = "errors")]
    pub errors: std::collections::HashMap<String, String>,
    /// Object keys that have been inserted in the index and their geohash.
    #[serde(rename = "results")]
    pub results: std::collections::HashMap<String, String>,
}

impl InsertKeyBatchResponse {
    /// Returns results and errors of batch key insert
    pub fn new(errors: std::collections::HashMap<String, String>, results: std::collections::HashMap<String, String>) -> InsertKeyBatchResponse {
        InsertKeyBatchResponse {
            errors,
            results,
        }
    }
}