1#[cfg(feature = "rust")]
2use bon::Builder;
3#[cfg(feature = "node")]
4use napi_derive::napi;
5#[cfg(feature = "python")]
6use pyo3::pyclass;
7#[cfg(feature = "python")]
8use pyo3_stub_gen::derive::gen_stub_pyclass;
9use serde::{Deserialize, Serialize};
10
11#[cfg_attr(feature = "python", gen_stub_pyclass)]
13#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
14#[cfg_attr(feature = "node", napi(object))]
15#[cfg_attr(feature = "rust", derive(Builder))]
16#[derive(Debug, Clone, Default, Serialize)]
17pub struct BulkUpdateEndpointStatusRequest {
18 pub ids: Vec<String>,
20 pub status: String,
22}
23
24#[cfg_attr(feature = "python", gen_stub_pyclass)]
26#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
27#[cfg_attr(feature = "node", napi(object))]
28#[derive(Debug, Clone, Serialize, Deserialize)]
29pub struct BulkOperationResult {
30 pub id: String,
32 pub success: bool,
34}
35
36#[cfg_attr(feature = "python", gen_stub_pyclass)]
38#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
39#[cfg_attr(feature = "node", napi(object))]
40#[derive(Debug, Clone, Serialize, Deserialize)]
41pub struct BulkUpdateEndpointStatusData {
42 pub total: i32,
44 pub updated_count: i32,
46 pub failed_count: i32,
48 #[serde(default)]
50 pub results: Vec<BulkOperationResult>,
51}
52
53#[cfg_attr(feature = "python", gen_stub_pyclass)]
55#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
56#[cfg_attr(feature = "node", napi(object))]
57#[derive(Debug, Clone, Serialize, Deserialize)]
58pub struct BulkUpdateEndpointStatusResponse {
59 pub data: Option<BulkUpdateEndpointStatusData>,
61 pub error: Option<String>,
63}
64
65#[cfg_attr(feature = "python", gen_stub_pyclass)]
67#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
68#[cfg_attr(feature = "node", napi(object))]
69#[cfg_attr(feature = "rust", derive(Builder))]
70#[derive(Debug, Clone, Default, Serialize)]
71pub struct BulkAddTagRequest {
72 pub ids: Vec<String>,
74 pub label: String,
76}
77
78#[cfg_attr(feature = "python", gen_stub_pyclass)]
80#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
81#[cfg_attr(feature = "node", napi(object))]
82#[derive(Debug, Clone, Serialize, Deserialize)]
83pub struct BulkTag {
84 pub tag_id: i32,
86 pub label: String,
88}
89
90#[cfg_attr(feature = "python", gen_stub_pyclass)]
92#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
93#[cfg_attr(feature = "node", napi(object))]
94#[derive(Debug, Clone, Serialize, Deserialize)]
95pub struct BulkAddTagData {
96 pub total: i32,
98 pub updated_count: i32,
100 pub failed_count: i32,
102 #[serde(default)]
104 pub results: Vec<BulkOperationResult>,
105 pub tag: BulkTag,
107}
108
109#[cfg_attr(feature = "python", gen_stub_pyclass)]
111#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
112#[cfg_attr(feature = "node", napi(object))]
113#[derive(Debug, Clone, Serialize, Deserialize)]
114pub struct BulkAddTagResponse {
115 pub data: Option<BulkAddTagData>,
117 pub error: Option<String>,
119}
120
121#[cfg_attr(feature = "python", gen_stub_pyclass)]
123#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
124#[cfg_attr(feature = "node", napi(object))]
125#[cfg_attr(feature = "rust", derive(Builder))]
126#[derive(Debug, Clone, Default, Serialize)]
127pub struct BulkRemoveTagRequest {
128 pub ids: Vec<String>,
130 pub tag_id: i32,
132}
133
134#[cfg_attr(feature = "python", gen_stub_pyclass)]
136#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
137#[cfg_attr(feature = "node", napi(object))]
138#[derive(Debug, Clone, Serialize, Deserialize)]
139pub struct BulkRemoveTagData {
140 pub total: i32,
142 pub updated_count: i32,
144 pub failed_count: i32,
146 #[serde(default)]
148 pub results: Vec<BulkOperationResult>,
149}
150
151#[cfg_attr(feature = "python", gen_stub_pyclass)]
153#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
154#[cfg_attr(feature = "node", napi(object))]
155#[derive(Debug, Clone, Serialize, Deserialize)]
156pub struct BulkRemoveTagResponse {
157 pub data: Option<BulkRemoveTagData>,
159 pub error: Option<String>,
161}