opensearch_client/cluster/allocation_explain/
allocation_store.rs1use serde::{Deserialize, Serialize};
12
13
14
15
16#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
17pub struct AllocationStore {
18 #[serde(rename = "in_sync")]
19 pub in_sync: bool,
20 #[serde(rename = "allocation_id")]
21 pub allocation_id: String,
22 #[serde(rename = "matching_size_in_bytes")]
23 pub matching_size_in_bytes: u32,
24 #[serde(rename = "store_exception")]
25 pub store_exception: String,
26 #[serde(rename = "found")]
27 pub found: bool,
28 #[serde(rename = "matching_sync_id")]
29 pub matching_sync_id: bool,
30}
31
32impl AllocationStore {
33
34 pub fn new(in_sync: bool, allocation_id: String, matching_size_in_bytes: u32, store_exception: String, found: bool, matching_sync_id: bool) -> AllocationStore {
35 AllocationStore {
36 in_sync,
37 allocation_id,
38 matching_size_in_bytes,
39 store_exception,
40 found,
41 matching_sync_id,
42 }
43 }
44}