Skip to main content

mountos_admin_sdk/
types_gen.rs

1// Code generated by gen; DO NOT EDIT.
2
3use serde::{Deserialize, Serialize};
4
5/// Client configuration.
6#[derive(Debug, Clone, Default)]
7#[non_exhaustive]
8pub struct Config {
9    /// Base URL of the appserv provider API, e.g. `https://appserv.example.com`.
10    pub base_url: String,
11    /// Base64-encoded ED25519 private key (32-byte seed or 64-byte seed+public key).
12    pub private_key: String,
13    /// Optional dashboard operator context, signed into each request.
14    pub dashboard_user: Option<DashboardUser>,
15    /// Dedicated HMAC secret for the `X-MountOS-Dashboard-User` header (appserv
16    /// `DASHBOARD_USER_HMAC_KEY`); required when `dashboard_user` is set.
17    pub dashboard_hmac_key: Option<String>,
18}
19
20impl Config {
21    /// Builds the value from its required fields. Optional fields start unset.
22    pub fn new(base_url: impl Into<String>, private_key: impl Into<String>) -> Self {
23        Self {
24            base_url: base_url.into(),
25            private_key: private_key.into(),
26            dashboard_user: None,
27            dashboard_hmac_key: None,
28        }
29    }
30
31    /// Sets `dashboard_user`.
32    pub fn with_dashboard_user(mut self, value: DashboardUser) -> Self {
33        self.dashboard_user = Some(value);
34        self
35    }
36
37    /// Sets `dashboard_hmac_key`.
38    pub fn with_dashboard_hmac_key(mut self, value: impl Into<String>) -> Self {
39        self.dashboard_hmac_key = Some(value.into());
40        self
41    }
42}
43
44/// Page-based pagination options.
45#[derive(Debug, Clone, Default)]
46#[non_exhaustive]
47pub struct ListOptions {
48    pub page: Option<i64>,
49    pub limit: Option<i64>,
50}
51
52impl ListOptions {
53    /// Sets `page`.
54    pub fn with_page(mut self, value: i64) -> Self {
55        self.page = Some(value);
56        self
57    }
58
59    /// Sets `limit`.
60    pub fn with_limit(mut self, value: i64) -> Self {
61        self.limit = Some(value);
62        self
63    }
64}
65
66/// Pagination metadata returned by page-based list endpoints.
67#[derive(Debug, Clone, Deserialize)]
68#[non_exhaustive]
69pub struct PaginationMeta {
70    pub page: i64,
71    pub limit: i64,
72    pub total: i64,
73    #[serde(rename = "totalPages")]
74    pub total_pages: i64,
75}
76
77/// Page-based list response.
78#[derive(Debug, Clone, Deserialize)]
79#[non_exhaustive]
80pub struct PaginatedResponse<T> {
81    pub items: Vec<T>,
82    pub pagination: PaginationMeta,
83}
84
85/// Cursor-based list response.
86#[derive(Debug, Clone, Deserialize)]
87#[non_exhaustive]
88pub struct CursorPaginatedResponse<T> {
89    pub items: Vec<T>,
90    #[serde(rename = "nextCursor")]
91    pub next_cursor: Option<i64>,
92}
93
94/// Cursor-based list response whose cursor is an opaque string.
95#[derive(Debug, Clone, Deserialize)]
96#[non_exhaustive]
97pub struct StringCursorPaginatedResponse<T> {
98    pub items: Vec<T>,
99    #[serde(rename = "nextCursor")]
100    pub next_cursor: Option<String>,
101}
102
103/// Identifier returned by create/edit/toggle endpoints.
104#[derive(Debug, Clone, Deserialize)]
105#[non_exhaustive]
106pub struct IdResponse {
107    pub id: i64,
108}
109
110/// `ClientSessionStatus` values accepted/returned on the wire. `UnknownValue` preserves a
111/// value this SDK does not recognize yet, for forward compatibility with
112/// a server that has introduced a new ClientSessionStatus value.
113#[derive(Debug, Clone, PartialEq, Eq)]
114#[non_exhaustive]
115pub enum ClientSessionStatus {
116    Connected,
117    Active,
118    Degraded,
119    Disconnected,
120    Expired,
121    Unknown,
122    /// A value not defined when this SDK was generated.
123    UnknownValue(String),
124}
125
126impl ClientSessionStatus {
127    /// Returns the wire string for this value.
128    pub fn as_str(&self) -> &str {
129        match self {
130            ClientSessionStatus::Connected => "connected",
131            ClientSessionStatus::Active => "active",
132            ClientSessionStatus::Degraded => "degraded",
133            ClientSessionStatus::Disconnected => "disconnected",
134            ClientSessionStatus::Expired => "expired",
135            ClientSessionStatus::Unknown => "unknown",
136            ClientSessionStatus::UnknownValue(s) => s.as_str(),
137        }
138    }
139
140    /// Reports whether this is one of the values defined when this SDK was
141    /// generated (false for `UnknownValue`).
142    pub fn is_known(&self) -> bool {
143        !matches!(self, ClientSessionStatus::UnknownValue(_))
144    }
145}
146
147impl std::fmt::Display for ClientSessionStatus {
148    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
149        f.write_str(self.as_str())
150    }
151}
152
153impl From<&str> for ClientSessionStatus {
154    fn from(s: &str) -> Self {
155        match s {
156            "connected" => ClientSessionStatus::Connected,
157            "active" => ClientSessionStatus::Active,
158            "degraded" => ClientSessionStatus::Degraded,
159            "disconnected" => ClientSessionStatus::Disconnected,
160            "expired" => ClientSessionStatus::Expired,
161            "unknown" => ClientSessionStatus::Unknown,
162            other => ClientSessionStatus::UnknownValue(other.to_string()),
163        }
164    }
165}
166
167impl Serialize for ClientSessionStatus {
168    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
169    where
170        S: serde::Serializer,
171    {
172        serializer.serialize_str(self.as_str())
173    }
174}
175
176impl<'de> Deserialize<'de> for ClientSessionStatus {
177    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
178    where
179        D: serde::Deserializer<'de>,
180    {
181        let s = String::deserialize(deserializer)?;
182        Ok(ClientSessionStatus::from(s.as_str()))
183    }
184}
185
186/// `CopysetState` values accepted/returned on the wire. `Unknown` preserves a
187/// value this SDK does not recognize yet, for forward compatibility with
188/// a server that has introduced a new CopysetState value.
189#[derive(Debug, Clone, PartialEq, Eq)]
190#[non_exhaustive]
191pub enum CopysetState {
192    Active,
193    Draining,
194    SyncedDrained,
195    Retired,
196    /// A value not defined when this SDK was generated.
197    Unknown(String),
198}
199
200impl CopysetState {
201    /// Returns the wire string for this value.
202    pub fn as_str(&self) -> &str {
203        match self {
204            CopysetState::Active => "active",
205            CopysetState::Draining => "draining",
206            CopysetState::SyncedDrained => "synced_drained",
207            CopysetState::Retired => "retired",
208            CopysetState::Unknown(s) => s.as_str(),
209        }
210    }
211
212    /// Reports whether this is one of the values defined when this SDK was
213    /// generated (false for `Unknown`).
214    pub fn is_known(&self) -> bool {
215        !matches!(self, CopysetState::Unknown(_))
216    }
217}
218
219impl std::fmt::Display for CopysetState {
220    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
221        f.write_str(self.as_str())
222    }
223}
224
225impl From<&str> for CopysetState {
226    fn from(s: &str) -> Self {
227        match s {
228            "active" => CopysetState::Active,
229            "draining" => CopysetState::Draining,
230            "synced_drained" => CopysetState::SyncedDrained,
231            "retired" => CopysetState::Retired,
232            other => CopysetState::Unknown(other.to_string()),
233        }
234    }
235}
236
237impl Serialize for CopysetState {
238    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
239    where
240        S: serde::Serializer,
241    {
242        serializer.serialize_str(self.as_str())
243    }
244}
245
246impl<'de> Deserialize<'de> for CopysetState {
247    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
248    where
249        D: serde::Deserializer<'de>,
250    {
251        let s = String::deserialize(deserializer)?;
252        Ok(CopysetState::from(s.as_str()))
253    }
254}
255
256/// `LicenseQuotaState` values accepted/returned on the wire. `Unknown` preserves a
257/// value this SDK does not recognize yet, for forward compatibility with
258/// a server that has introduced a new LicenseQuotaState value.
259#[derive(Debug, Clone, PartialEq, Eq)]
260#[non_exhaustive]
261pub enum LicenseQuotaState {
262    Ok,
263    Exceeded,
264    /// A value not defined when this SDK was generated.
265    Unknown(String),
266}
267
268impl LicenseQuotaState {
269    /// Returns the wire string for this value.
270    pub fn as_str(&self) -> &str {
271        match self {
272            LicenseQuotaState::Ok => "ok",
273            LicenseQuotaState::Exceeded => "exceeded",
274            LicenseQuotaState::Unknown(s) => s.as_str(),
275        }
276    }
277
278    /// Reports whether this is one of the values defined when this SDK was
279    /// generated (false for `Unknown`).
280    pub fn is_known(&self) -> bool {
281        !matches!(self, LicenseQuotaState::Unknown(_))
282    }
283}
284
285impl std::fmt::Display for LicenseQuotaState {
286    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
287        f.write_str(self.as_str())
288    }
289}
290
291impl From<&str> for LicenseQuotaState {
292    fn from(s: &str) -> Self {
293        match s {
294            "ok" => LicenseQuotaState::Ok,
295            "exceeded" => LicenseQuotaState::Exceeded,
296            other => LicenseQuotaState::Unknown(other.to_string()),
297        }
298    }
299}
300
301impl Serialize for LicenseQuotaState {
302    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
303    where
304        S: serde::Serializer,
305    {
306        serializer.serialize_str(self.as_str())
307    }
308}
309
310impl<'de> Deserialize<'de> for LicenseQuotaState {
311    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
312    where
313        D: serde::Deserializer<'de>,
314    {
315        let s = String::deserialize(deserializer)?;
316        Ok(LicenseQuotaState::from(s.as_str()))
317    }
318}
319
320/// `LicenseStatus` values accepted/returned on the wire. `Unknown` preserves a
321/// value this SDK does not recognize yet, for forward compatibility with
322/// a server that has introduced a new LicenseStatus value.
323#[derive(Debug, Clone, PartialEq, Eq)]
324#[non_exhaustive]
325pub enum LicenseStatus {
326    Valid,
327    Expiring,
328    Grace,
329    ExpiredAccess,
330    Expired,
331    /// A value not defined when this SDK was generated.
332    Unknown(String),
333}
334
335impl LicenseStatus {
336    /// Returns the wire string for this value.
337    pub fn as_str(&self) -> &str {
338        match self {
339            LicenseStatus::Valid => "valid",
340            LicenseStatus::Expiring => "expiring",
341            LicenseStatus::Grace => "grace",
342            LicenseStatus::ExpiredAccess => "expired_access",
343            LicenseStatus::Expired => "expired",
344            LicenseStatus::Unknown(s) => s.as_str(),
345        }
346    }
347
348    /// Reports whether this is one of the values defined when this SDK was
349    /// generated (false for `Unknown`).
350    pub fn is_known(&self) -> bool {
351        !matches!(self, LicenseStatus::Unknown(_))
352    }
353}
354
355impl std::fmt::Display for LicenseStatus {
356    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
357        f.write_str(self.as_str())
358    }
359}
360
361impl From<&str> for LicenseStatus {
362    fn from(s: &str) -> Self {
363        match s {
364            "valid" => LicenseStatus::Valid,
365            "expiring" => LicenseStatus::Expiring,
366            "grace" => LicenseStatus::Grace,
367            "expired_access" => LicenseStatus::ExpiredAccess,
368            "expired" => LicenseStatus::Expired,
369            other => LicenseStatus::Unknown(other.to_string()),
370        }
371    }
372}
373
374impl Serialize for LicenseStatus {
375    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
376    where
377        S: serde::Serializer,
378    {
379        serializer.serialize_str(self.as_str())
380    }
381}
382
383impl<'de> Deserialize<'de> for LicenseStatus {
384    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
385    where
386        D: serde::Deserializer<'de>,
387    {
388        let s = String::deserialize(deserializer)?;
389        Ok(LicenseStatus::from(s.as_str()))
390    }
391}
392
393#[derive(Debug, Clone, Serialize, Deserialize)]
394#[non_exhaustive]
395pub struct Account {
396    pub id: i64,
397    pub name: String,
398    pub description: String,
399    #[serde(rename = "iconUrl", skip_serializing_if = "Option::is_none")]
400    pub icon_url: Option<String>,
401    #[serde(rename = "providerInfo", skip_serializing_if = "Option::is_none")]
402    pub provider_info: Option<serde_json::Value>,
403    #[serde(rename = "liveVolume")]
404    pub live_volume: i64,
405    #[serde(rename = "totalVolume")]
406    pub total_volume: i64,
407    #[serde(rename = "quotaLimit")]
408    pub quota_limit: i64,
409    #[serde(rename = "quotaExcessPct")]
410    pub quota_excess_pct: i32,
411    #[serde(rename = "isActive")]
412    pub is_active: bool,
413    pub locked: bool,
414    #[serde(skip_serializing_if = "Option::is_none")]
415    pub retention: Option<RetentionPolicy>,
416    #[serde(rename = "createdAt")]
417    pub created_at: String,
418    #[serde(rename = "updatedAt")]
419    pub updated_at: String,
420}
421
422#[derive(Debug, Clone, Serialize, Deserialize)]
423#[non_exhaustive]
424pub struct User {
425    pub id: i64,
426    #[serde(rename = "accountId")]
427    pub account_id: i64,
428    pub username: String,
429    pub email: String,
430    pub name: String,
431    #[serde(rename = "isActive")]
432    pub is_active: bool,
433}
434
435#[derive(Debug, Clone, Serialize, Deserialize)]
436#[non_exhaustive]
437pub struct Region {
438    pub id: i64,
439    #[serde(rename = "exportId")]
440    pub export_id: String,
441    #[serde(rename = "accountId")]
442    pub account_id: i64,
443    pub name: String,
444    #[serde(rename = "liveVolume")]
445    pub live_volume: i64,
446    #[serde(rename = "totalVolume")]
447    pub total_volume: i64,
448    #[serde(rename = "isActive")]
449    pub is_active: bool,
450    #[serde(rename = "createdAt")]
451    pub created_at: String,
452    #[serde(rename = "updatedAt")]
453    pub updated_at: String,
454}
455
456#[derive(Debug, Clone, Serialize, Deserialize)]
457#[non_exhaustive]
458pub struct MetadataCluster {
459    pub id: i64,
460    #[serde(rename = "exportId")]
461    pub export_id: String,
462    #[serde(rename = "regionId")]
463    pub region_id: i64,
464    pub name: String,
465    #[serde(rename = "defaultCluster")]
466    pub default_cluster: bool,
467    #[serde(rename = "isReady")]
468    pub is_ready: bool,
469    #[serde(rename = "isActive")]
470    pub is_active: bool,
471    #[serde(rename = "createdAt")]
472    pub created_at: String,
473    #[serde(rename = "updatedAt")]
474    pub updated_at: String,
475}
476
477#[derive(Debug, Clone, Serialize, Deserialize)]
478#[non_exhaustive]
479pub struct Storage {
480    pub id: i64,
481    pub uuid: String,
482    pub account: Ref,
483    #[serde(rename = "regionInfo")]
484    pub region_info: Ref,
485    pub name: String,
486    #[serde(skip_serializing_if = "Option::is_none")]
487    pub description: Option<String>,
488    #[serde(rename = "storageType")]
489    pub storage_type: String,
490    #[serde(rename = "providerType")]
491    pub provider_type: String,
492    pub endpoint: String,
493    #[serde(skip_serializing_if = "Option::is_none")]
494    pub region: Option<String>,
495    #[serde(skip_serializing_if = "Option::is_none")]
496    pub bucket: Option<String>,
497    #[serde(skip_serializing_if = "Option::is_none")]
498    pub base: Option<String>,
499    #[serde(rename = "physicalFingerprint", skip_serializing_if = "Option::is_none")]
500    pub physical_fingerprint: Option<String>,
501    #[serde(rename = "blockRegion", skip_serializing_if = "Option::is_none")]
502    pub block_region: Option<String>,
503    #[serde(rename = "blockSize", skip_serializing_if = "Option::is_none")]
504    pub block_size: Option<i32>,
505    #[serde(rename = "directAccess", skip_serializing_if = "Option::is_none")]
506    pub direct_access: Option<bool>,
507    #[serde(rename = "isActive")]
508    pub is_active: bool,
509    #[serde(rename = "createdAt")]
510    pub created_at: String,
511    #[serde(rename = "updatedAt")]
512    pub updated_at: String,
513}
514
515#[derive(Debug, Clone, Serialize, Deserialize)]
516#[non_exhaustive]
517pub struct BlockVolume {
518    pub id: String,
519    #[serde(skip_serializing_if = "Option::is_none")]
520    pub name: Option<String>,
521    #[serde(rename = "shardId")]
522    pub shard_id: i64,
523    #[serde(rename = "isActive")]
524    pub is_active: bool,
525    #[serde(rename = "createdAt")]
526    pub created_at: String,
527    #[serde(rename = "updatedAt")]
528    pub updated_at: String,
529    #[serde(rename = "memberState", skip_serializing_if = "Option::is_none")]
530    pub member_state: Option<String>,
531    #[serde(rename = "copysetId", skip_serializing_if = "Option::is_none")]
532    pub copyset_id: Option<String>,
533}
534
535#[derive(Debug, Clone, Serialize, Deserialize)]
536#[non_exhaustive]
537pub struct Copyset {
538    pub id: String,
539    #[serde(rename = "storageId")]
540    pub storage_id: String,
541    pub name: String,
542    pub state: CopysetState,
543    #[serde(rename = "memberA", skip_serializing_if = "Option::is_none")]
544    pub member_a: Option<String>,
545    #[serde(rename = "memberB", skip_serializing_if = "Option::is_none")]
546    pub member_b: Option<String>,
547    #[serde(rename = "drainStartedAt", skip_serializing_if = "Option::is_none")]
548    pub drain_started_at: Option<String>,
549    #[serde(rename = "syncedAt", skip_serializing_if = "Option::is_none")]
550    pub synced_at: Option<String>,
551    #[serde(rename = "retiredAt", skip_serializing_if = "Option::is_none")]
552    pub retired_at: Option<String>,
553    #[serde(rename = "pendingSyncJobsA", skip_serializing_if = "Option::is_none")]
554    pub pending_sync_jobs_a: Option<i32>,
555    #[serde(rename = "pendingSyncJobsB", skip_serializing_if = "Option::is_none")]
556    pub pending_sync_jobs_b: Option<i32>,
557    #[serde(rename = "pendingSyncJobsObservedAt", skip_serializing_if = "Option::is_none")]
558    pub pending_sync_jobs_observed_at: Option<String>,
559    #[serde(rename = "volumeCount")]
560    pub volume_count: i64,
561    #[serde(rename = "drainInitiatedBy", skip_serializing_if = "Option::is_none")]
562    pub drain_initiated_by: Option<i64>,
563    pub tags: Vec<String>,
564}
565
566#[derive(Debug, Clone, Serialize, Deserialize)]
567#[non_exhaustive]
568pub struct PoolMember {
569    pub id: String,
570    pub name: String,
571    #[serde(rename = "regionId")]
572    pub region_id: i64,
573    #[serde(rename = "memberState")]
574    pub member_state: String,
575    #[serde(rename = "failureDomain", skip_serializing_if = "Option::is_none")]
576    pub failure_domain: Option<String>,
577}
578
579#[derive(Debug, Clone, Serialize, Deserialize)]
580#[non_exhaustive]
581pub struct Volume {
582    pub id: i64,
583    pub account: Ref,
584    pub storage: Ref,
585    pub region: Ref,
586    #[serde(rename = "metadataCluster", skip_serializing_if = "Option::is_none")]
587    pub metadata_cluster: Option<Ref>,
588    pub name: String,
589    #[serde(skip_serializing_if = "Option::is_none")]
590    pub description: Option<String>,
591    #[serde(rename = "volumeType")]
592    pub volume_type: String,
593    #[serde(rename = "storageType", skip_serializing_if = "Option::is_none")]
594    pub storage_type: Option<String>,
595    pub encryption: bool,
596    #[serde(rename = "quotaLimit")]
597    pub quota_limit: i64,
598    #[serde(rename = "liveVolume")]
599    pub live_volume: i64,
600    #[serde(rename = "totalVolume")]
601    pub total_volume: i64,
602    #[serde(rename = "pendingVolume")]
603    pub pending_volume: i64,
604    #[serde(rename = "liveInactiveVolume")]
605    pub live_inactive_volume: i64,
606    pub locked: bool,
607    pub retention: VolumeRetentionPolicy,
608    pub versioning: VolumeVersioningPolicy,
609    pub compaction: String,
610    #[serde(rename = "isActive")]
611    pub is_active: bool,
612    #[serde(rename = "isCleanupMetaEnabled")]
613    pub is_cleanup_meta_enabled: bool,
614    #[serde(rename = "isCleanupStorageEnabled")]
615    pub is_cleanup_storage_enabled: bool,
616    #[serde(rename = "isCleanupVaultEnabled")]
617    pub is_cleanup_vault_enabled: bool,
618    #[serde(rename = "createdAt")]
619    pub created_at: String,
620    #[serde(rename = "updatedAt")]
621    pub updated_at: String,
622}
623
624#[derive(Debug, Clone, Serialize, Deserialize)]
625#[non_exhaustive]
626pub struct VolumeBlockPlacementConfig {
627    pub id: i64,
628    #[serde(rename = "targetCopysetCount")]
629    pub target_copyset_count: i32,
630    #[serde(rename = "currentEpoch")]
631    pub current_epoch: i64,
632    #[serde(rename = "copysetIds")]
633    pub copyset_ids: Vec<String>,
634}
635
636#[derive(Debug, Clone, Serialize, Deserialize)]
637#[non_exhaustive]
638pub struct VolumeBlockPlacementResizeResult {
639    pub id: i64,
640    #[serde(rename = "targetCopysetCount")]
641    pub target_copyset_count: i32,
642    #[serde(rename = "copysetCountBefore")]
643    pub copyset_count_before: i32,
644    #[serde(rename = "copysetsAdded")]
645    pub copysets_added: i32,
646    #[serde(rename = "copysetsRemoved")]
647    pub copysets_removed: i32,
648    #[serde(rename = "copysetCountAfter")]
649    pub copyset_count_after: i32,
650    pub epoch: i64,
651    pub partial: bool,
652    #[serde(skip_serializing_if = "Option::is_none")]
653    pub reason: Option<String>,
654}
655
656#[derive(Debug, Clone, Serialize, Deserialize)]
657#[non_exhaustive]
658pub struct Fork {
659    pub fid: i32,
660    pub name: String,
661    #[serde(rename = "parentFid")]
662    pub parent_fid: i32,
663    #[serde(rename = "parentName")]
664    pub parent_name: String,
665    #[serde(rename = "snapshotTs")]
666    pub snapshot_ts: i64,
667    #[serde(rename = "createdBy", skip_serializing_if = "Option::is_none")]
668    pub created_by: Option<i64>,
669    #[serde(rename = "createdAt")]
670    pub created_at: i64,
671    #[serde(rename = "childrenCount")]
672    pub children_count: i32,
673    #[serde(skip_serializing_if = "Option::is_none")]
674    pub inactive: Option<bool>,
675    #[serde(rename = "inactiveAt", skip_serializing_if = "Option::is_none")]
676    pub inactive_at: Option<i64>,
677    pub status: String,
678    pub size: i64,
679}
680
681#[derive(Debug, Clone, Serialize, Deserialize)]
682#[non_exhaustive]
683pub struct ExclusiveGrantsResponse {
684    #[serde(rename = "volumeId")]
685    pub volume_id: i64,
686    pub grants: Vec<ExclusiveGrant>,
687    #[serde(rename = "ownerReachable")]
688    pub owner_reachable: bool,
689    pub truncated: bool,
690}
691
692#[derive(Debug, Clone, Serialize, Deserialize)]
693#[non_exhaustive]
694pub struct ForkTreeEntry {
695    pub inode: i64,
696    pub name: String,
697    pub kind: String,
698    pub size: i64,
699    pub mtime: i64,
700    pub ctime: i64,
701    #[serde(rename = "creatorId", skip_serializing_if = "Option::is_none")]
702    pub creator_id: Option<i64>,
703    #[serde(rename = "updaterId", skip_serializing_if = "Option::is_none")]
704    pub updater_id: Option<i64>,
705}
706
707#[derive(Debug, Clone, Serialize, Deserialize)]
708#[non_exhaustive]
709pub struct ForkEntryDetail {
710    pub inode: i64,
711    pub path: String,
712    pub name: String,
713    pub kind: String,
714    pub size: i64,
715    pub mtime: i64,
716    pub ctime: i64,
717    pub generation: i64,
718    #[serde(skip_serializing_if = "Option::is_none")]
719    pub owner: Option<String>,
720    #[serde(skip_serializing_if = "Option::is_none")]
721    pub mode: Option<i32>,
722    #[serde(skip_serializing_if = "Option::is_none")]
723    pub xattrs: Option<serde_json::Value>,
724    #[serde(rename = "creatorId", skip_serializing_if = "Option::is_none")]
725    pub creator_id: Option<i64>,
726    #[serde(rename = "updaterId", skip_serializing_if = "Option::is_none")]
727    pub updater_id: Option<i64>,
728}
729
730#[derive(Debug, Clone, Serialize, Deserialize)]
731#[non_exhaustive]
732pub struct ForkEntryVersion {
733    pub generation: i64,
734    pub size: i64,
735    pub mtime: i64,
736    #[serde(rename = "updaterId", skip_serializing_if = "Option::is_none")]
737    pub updater_id: Option<i64>,
738    #[serde(rename = "contentHash", skip_serializing_if = "Option::is_none")]
739    pub content_hash: Option<String>,
740}
741
742#[derive(Debug, Clone, Serialize, Deserialize)]
743#[non_exhaustive]
744pub struct ForkTreeMatch {
745    pub path: String,
746    pub inode: i64,
747    pub kind: String,
748    pub size: i64,
749    pub mtime: i64,
750}
751
752#[derive(Debug, Clone, Serialize, Deserialize)]
753#[non_exhaustive]
754pub struct AuditLog {
755    pub id: i64,
756    pub title: String,
757    #[serde(skip_serializing_if = "Option::is_none")]
758    pub description: Option<String>,
759    #[serde(skip_serializing_if = "Option::is_none")]
760    pub subject: Option<String>,
761    pub success: bool,
762    #[serde(skip_serializing_if = "Option::is_none")]
763    pub data: Option<serde_json::Value>,
764    #[serde(rename = "createdBy", skip_serializing_if = "Option::is_none")]
765    pub created_by: Option<String>,
766    #[serde(skip_serializing_if = "Option::is_none")]
767    pub node: Option<String>,
768    #[serde(rename = "accountId", skip_serializing_if = "Option::is_none")]
769    pub account_id: Option<i64>,
770    #[serde(rename = "regionId", skip_serializing_if = "Option::is_none")]
771    pub region_id: Option<i64>,
772    #[serde(rename = "metadataClusterId", skip_serializing_if = "Option::is_none")]
773    pub metadata_cluster_id: Option<i64>,
774    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
775    pub created_at: Option<String>,
776    #[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")]
777    pub updated_at: Option<String>,
778}
779
780#[derive(Debug, Clone, Serialize, Deserialize)]
781#[non_exhaustive]
782pub struct ServiceNode {
783    pub id: i64,
784    #[serde(rename = "regionId")]
785    pub region_id: i64,
786    #[serde(rename = "metadataClusterId", skip_serializing_if = "Option::is_none")]
787    pub metadata_cluster_id: Option<i64>,
788    #[serde(rename = "serviceType")]
789    pub service_type: String,
790    #[serde(rename = "nodeId")]
791    pub node_id: String,
792    #[serde(rename = "advertiseAddr")]
793    pub advertise_addr: String,
794    #[serde(rename = "rpcAddr", skip_serializing_if = "Option::is_none")]
795    pub rpc_addr: Option<String>,
796    #[serde(skip_serializing_if = "Option::is_none")]
797    pub addrs: Option<Vec<NodeAddress>>,
798    #[serde(skip_serializing_if = "Option::is_none")]
799    pub metadata: Option<serde_json::Value>,
800    #[serde(rename = "metricsEndpoint", skip_serializing_if = "Option::is_none")]
801    pub metrics_endpoint: Option<String>,
802    #[serde(rename = "instanceId", skip_serializing_if = "Option::is_none")]
803    pub instance_id: Option<String>,
804    #[serde(rename = "instanceInfo", skip_serializing_if = "Option::is_none")]
805    pub instance_info: Option<serde_json::Value>,
806    pub status: String,
807    #[serde(rename = "lastHeartbeat", skip_serializing_if = "Option::is_none")]
808    pub last_heartbeat: Option<i64>,
809    #[serde(rename = "isActive")]
810    pub is_active: bool,
811    #[serde(rename = "memUsage", skip_serializing_if = "Option::is_none")]
812    pub mem_usage: Option<f64>,
813    #[serde(rename = "sysLoad", skip_serializing_if = "Option::is_none")]
814    pub sys_load: Option<i64>,
815    #[serde(rename = "binaryVersion", skip_serializing_if = "Option::is_none")]
816    pub binary_version: Option<i32>,
817}
818
819#[derive(Debug, Clone, Serialize, Deserialize)]
820#[non_exhaustive]
821pub struct ClientSession {
822    pub id: i64,
823    pub account: Ref,
824    pub region: Ref,
825    #[serde(rename = "metadataCluster", skip_serializing_if = "Option::is_none")]
826    pub metadata_cluster: Option<Ref>,
827    pub volume: VolumeRef,
828    #[serde(skip_serializing_if = "Option::is_none")]
829    pub user: Option<Ref>,
830    #[serde(rename = "clientType")]
831    pub client_type: String,
832    #[serde(rename = "osName")]
833    pub os_name: String,
834    #[serde(rename = "osVersion", skip_serializing_if = "Option::is_none")]
835    pub os_version: Option<String>,
836    #[serde(rename = "appVersion", skip_serializing_if = "Option::is_none")]
837    pub app_version: Option<String>,
838    #[serde(skip_serializing_if = "Option::is_none")]
839    pub hostname: Option<String>,
840    #[serde(rename = "ipAddr")]
841    pub ip_addr: String,
842    #[serde(rename = "mountMode", skip_serializing_if = "Option::is_none")]
843    pub mount_mode: Option<String>,
844    #[serde(rename = "mountPath", skip_serializing_if = "Option::is_none")]
845    pub mount_path: Option<String>,
846    #[serde(rename = "forkName", skip_serializing_if = "Option::is_none")]
847    pub fork_name: Option<String>,
848    #[serde(rename = "isTemporaryFork")]
849    pub is_temporary_fork: bool,
850    #[serde(skip_serializing_if = "Option::is_none")]
851    pub metadata: Option<serde_json::Value>,
852    #[serde(skip_serializing_if = "Option::is_none")]
853    pub metrics: Option<serde_json::Value>,
854    pub status: ClientSessionStatus,
855    #[serde(rename = "lastHeartbeat", skip_serializing_if = "Option::is_none")]
856    pub last_heartbeat: Option<i64>,
857    #[serde(rename = "connectedAt", skip_serializing_if = "Option::is_none")]
858    pub connected_at: Option<i64>,
859    #[serde(rename = "disconnectedAt", skip_serializing_if = "Option::is_none")]
860    pub disconnected_at: Option<i64>,
861    #[serde(rename = "isActive")]
862    pub is_active: bool,
863}
864
865#[derive(Debug, Clone, Serialize, Deserialize)]
866#[non_exhaustive]
867pub struct SessionSummary {
868    #[serde(rename = "byStatus")]
869    pub by_status: Vec<SessionSummaryStatusEntry>,
870    #[serde(rename = "byPlatform")]
871    pub by_platform: Vec<SessionSummaryFacet>,
872    #[serde(rename = "byOsName")]
873    pub by_os_name: Vec<SessionSummaryFacet>,
874    #[serde(rename = "regionCount")]
875    pub region_count: i64,
876    #[serde(rename = "volumeCount")]
877    pub volume_count: i64,
878    #[serde(rename = "hostCount")]
879    pub host_count: i64,
880    #[serde(rename = "degradedCount")]
881    pub degraded_count: i64,
882}
883
884#[derive(Debug, Clone, Serialize, Deserialize)]
885#[non_exhaustive]
886pub struct MountReportResponse {
887    #[serde(skip_serializing_if = "Option::is_none")]
888    pub mount: Option<MountDetails>,
889    #[serde(rename = "lastHeartbeat", skip_serializing_if = "Option::is_none")]
890    pub last_heartbeat: Option<i64>,
891    #[serde(rename = "ageSeconds", skip_serializing_if = "Option::is_none")]
892    pub age_seconds: Option<i64>,
893}
894
895#[derive(Debug, Clone, Serialize, Deserialize)]
896#[non_exhaustive]
897pub struct SupportBundle {
898    pub session: ClientSession,
899    #[serde(rename = "mountReport")]
900    pub mount_report: MountReportResponse,
901    #[serde(rename = "serverTime")]
902    pub server_time: i64,
903}
904
905#[derive(Debug, Clone, Serialize, Deserialize)]
906#[non_exhaustive]
907pub struct DiscoverMetaResponse {
908    #[serde(rename = "regionId")]
909    pub region_id: i64,
910    pub region: String,
911    pub endpoints: Vec<DiscoverEndpoint>,
912}
913
914#[derive(Debug, Clone, Serialize, Deserialize)]
915#[non_exhaustive]
916pub struct MetricsTarget {
917    pub targets: Vec<String>,
918    pub labels: serde_json::Value,
919}
920
921#[derive(Debug, Clone, Serialize, Deserialize)]
922#[non_exhaustive]
923pub struct MetricsTokenResponse {
924    pub token: String,
925}
926
927#[derive(Debug, Clone, Serialize, Deserialize)]
928#[non_exhaustive]
929pub struct DashboardStats {
930    #[serde(rename = "userCount")]
931    pub user_count: i64,
932    #[serde(rename = "volumeCount")]
933    pub volume_count: i64,
934    #[serde(rename = "regionCount")]
935    pub region_count: i64,
936    #[serde(rename = "storageCount")]
937    pub storage_count: i64,
938    #[serde(rename = "totalVolumeUsed")]
939    pub total_volume_used: i64,
940    #[serde(rename = "totalQuotaLimit")]
941    pub total_quota_limit: i64,
942    #[serde(rename = "activeSessionCount")]
943    pub active_session_count: i64,
944    #[serde(rename = "regionBreakdown")]
945    pub region_breakdown: Vec<RegionVolumeMetrics>,
946}
947
948#[derive(Debug, Clone, Serialize, Deserialize)]
949#[non_exhaustive]
950pub struct LicenseDetails {
951    #[serde(rename = "licenseId")]
952    pub license_id: String,
953    pub licensee: String,
954    pub contact: String,
955    #[serde(rename = "licenseType")]
956    pub license_type: String,
957    #[serde(rename = "issuedAt")]
958    pub issued_at: String,
959    #[serde(rename = "expiresAt")]
960    pub expires_at: String,
961    #[serde(rename = "gracePeriodDays")]
962    pub grace_period_days: i64,
963    #[serde(rename = "expiredAccessDays")]
964    pub expired_access_days: i64,
965    #[serde(rename = "maxNodes")]
966    pub max_nodes: i64,
967    #[serde(rename = "maxVolumes")]
968    pub max_volumes: i64,
969    #[serde(rename = "maxUsers")]
970    pub max_users: i64,
971    #[serde(rename = "maxAccounts")]
972    pub max_accounts: i64,
973    #[serde(rename = "maxRegions")]
974    pub max_regions: i64,
975    #[serde(rename = "maxStorageBytes")]
976    pub max_storage_bytes: i64,
977    pub status: LicenseStatus,
978    #[serde(rename = "daysRemaining")]
979    pub days_remaining: i64,
980    #[serde(rename = "graceEndsAt")]
981    pub grace_ends_at: String,
982    #[serde(rename = "graceDaysLeft")]
983    pub grace_days_left: i64,
984    #[serde(rename = "expiredAccessEndsAt")]
985    pub expired_access_ends_at: String,
986    #[serde(rename = "expiredAccessDaysLeft")]
987    pub expired_access_days_left: i64,
988    pub quota: LicenseQuota,
989    #[serde(skip_serializing_if = "Option::is_none")]
990    pub distribution: Option<String>,
991    #[serde(rename = "distributionRef", skip_serializing_if = "Option::is_none")]
992    pub distribution_ref: Option<Vec<String>>,
993    #[serde(skip_serializing_if = "Option::is_none")]
994    pub deployment: Option<String>,
995    #[serde(skip_serializing_if = "Option::is_none")]
996    pub domains: Option<Vec<String>>,
997    #[serde(rename = "unlimitedStorage", skip_serializing_if = "Option::is_none")]
998    pub unlimited_storage: Option<bool>,
999}
1000
1001#[derive(Debug, Clone, Serialize, Deserialize)]
1002#[non_exhaustive]
1003pub struct LicenseTerms {
1004    pub terms: String,
1005}
1006
1007#[derive(Debug, Clone, Serialize, Deserialize)]
1008#[non_exhaustive]
1009pub struct LicenseLoadResult {
1010    pub loaded: i64,
1011    pub ignored: i64,
1012}
1013
1014#[derive(Debug, Clone, Serialize, Deserialize)]
1015#[non_exhaustive]
1016pub struct LicenseList {
1017    pub items: Vec<LicenseRecord>,
1018}
1019
1020#[derive(Debug, Clone, Serialize, Deserialize)]
1021#[non_exhaustive]
1022pub struct ServiceAlert {
1023    pub id: i64,
1024    #[serde(rename = "alertId")]
1025    pub alert_id: String,
1026    pub source: String,
1027    #[serde(rename = "nodeId")]
1028    pub node_id: String,
1029    pub severity: i64,
1030    pub category: String,
1031    pub title: String,
1032    #[serde(skip_serializing_if = "Option::is_none")]
1033    pub description: Option<String>,
1034    #[serde(skip_serializing_if = "Option::is_none")]
1035    pub region: Option<Ref>,
1036    #[serde(skip_serializing_if = "Option::is_none")]
1037    pub account: Option<Ref>,
1038    #[serde(rename = "eventTime")]
1039    pub event_time: String,
1040    #[serde(rename = "resolvedAt", skip_serializing_if = "Option::is_none")]
1041    pub resolved_at: Option<String>,
1042    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
1043    pub created_at: Option<String>,
1044}
1045
1046#[derive(Debug, Clone, Serialize, Deserialize)]
1047#[non_exhaustive]
1048pub struct AlertCountResponse {
1049    pub active: i64,
1050    pub recent: i64,
1051    #[serde(rename = "infoCount")]
1052    pub info_count: i64,
1053    #[serde(rename = "warningCount")]
1054    pub warning_count: i64,
1055    #[serde(rename = "criticalCount")]
1056    pub critical_count: i64,
1057    #[serde(rename = "asOf")]
1058    pub as_of: String,
1059}
1060
1061#[derive(Debug, Clone, Serialize, Deserialize)]
1062#[non_exhaustive]
1063pub struct RegionAlert {
1064    pub id: i64,
1065    #[serde(rename = "alertId")]
1066    pub alert_id: String,
1067    pub source: String,
1068    #[serde(rename = "nodeId")]
1069    pub node_id: String,
1070    #[serde(rename = "metadataClusterId", skip_serializing_if = "Option::is_none")]
1071    pub metadata_cluster_id: Option<i64>,
1072    pub severity: i64,
1073    pub category: String,
1074    pub title: String,
1075    #[serde(skip_serializing_if = "Option::is_none")]
1076    pub description: Option<String>,
1077    #[serde(rename = "eventTime")]
1078    pub event_time: String,
1079    #[serde(rename = "resolvedAt", skip_serializing_if = "Option::is_none")]
1080    pub resolved_at: Option<String>,
1081    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
1082    pub created_at: Option<String>,
1083}
1084
1085#[derive(Debug, Clone, Serialize, Deserialize)]
1086#[non_exhaustive]
1087pub struct GCWorkerEvent {
1088    pub id: i64,
1089    #[serde(rename = "nodeId")]
1090    pub node_id: String,
1091    #[serde(rename = "metadataClusterId", skip_serializing_if = "Option::is_none")]
1092    pub metadata_cluster_id: Option<i64>,
1093    pub goal: String,
1094    #[serde(skip_serializing_if = "Option::is_none")]
1095    pub sid: Option<i64>,
1096    #[serde(skip_serializing_if = "Option::is_none")]
1097    pub subject: Option<String>,
1098    pub ops: serde_json::Value,
1099    #[serde(rename = "durationMs")]
1100    pub duration_ms: i64,
1101    #[serde(rename = "eventTime")]
1102    pub event_time: String,
1103    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
1104    pub created_at: Option<String>,
1105}
1106
1107#[derive(Debug, Clone, Serialize, Deserialize)]
1108#[non_exhaustive]
1109pub struct GCWorkerEventHistogramResponse {
1110    pub buckets: Vec<GCWorkerEventBucket>,
1111}
1112
1113#[derive(Debug, Clone, Serialize, Deserialize)]
1114#[non_exhaustive]
1115pub struct GCWorkerEventGoalsResponse {
1116    pub goals: Vec<String>,
1117}
1118
1119#[derive(Debug, Clone, Serialize, Deserialize)]
1120#[non_exhaustive]
1121pub struct BackfillFailure {
1122    #[serde(rename = "shardId")]
1123    pub shard_id: i64,
1124    pub error: String,
1125}
1126
1127#[derive(Debug, Clone, Serialize, Deserialize)]
1128#[non_exhaustive]
1129pub struct CompatibleStorage {
1130    pub id: i64,
1131    pub uuid: String,
1132    pub name: String,
1133    #[serde(rename = "storageType")]
1134    pub storage_type: String,
1135    #[serde(rename = "providerType")]
1136    pub provider_type: String,
1137    pub volumes: Vec<CompatibleVolume>,
1138}
1139
1140#[derive(Debug, Clone, Serialize, Deserialize)]
1141#[non_exhaustive]
1142pub struct CompatibleVolume {
1143    pub id: String,
1144    pub name: String,
1145}
1146
1147#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1148#[non_exhaustive]
1149pub struct DashboardUser {
1150    pub id: String,
1151    pub name: String,
1152    #[serde(skip_serializing_if = "Option::is_none")]
1153    pub email: Option<String>,
1154    pub role: String,
1155    #[serde(skip_serializing_if = "Option::is_none")]
1156    pub username: Option<String>,
1157    #[serde(rename = "accountId", skip_serializing_if = "Option::is_none")]
1158    pub account_id: Option<i64>,
1159    #[serde(rename = "userId", skip_serializing_if = "Option::is_none")]
1160    pub user_id: Option<i64>,
1161    #[serde(rename = "volumeId", skip_serializing_if = "Option::is_none")]
1162    pub volume_id: Option<i64>,
1163    #[serde(skip_serializing_if = "Option::is_none")]
1164    pub exp: Option<i64>,
1165}
1166
1167impl DashboardUser {
1168    /// Builds the value from its required fields. Optional fields start unset.
1169    pub fn new(id: impl Into<String>, name: impl Into<String>, role: impl Into<String>) -> Self {
1170        Self {
1171            id: id.into(),
1172            name: name.into(),
1173            role: role.into(),
1174            email: None,
1175            username: None,
1176            account_id: None,
1177            user_id: None,
1178            volume_id: None,
1179            exp: None,
1180        }
1181    }
1182
1183    /// Sets `email`.
1184    pub fn with_email(mut self, value: impl Into<String>) -> Self {
1185        self.email = Some(value.into());
1186        self
1187    }
1188
1189    /// Sets `username`.
1190    pub fn with_username(mut self, value: impl Into<String>) -> Self {
1191        self.username = Some(value.into());
1192        self
1193    }
1194
1195    /// Sets `account_id`.
1196    pub fn with_account_id(mut self, value: i64) -> Self {
1197        self.account_id = Some(value);
1198        self
1199    }
1200
1201    /// Sets `user_id`.
1202    pub fn with_user_id(mut self, value: i64) -> Self {
1203        self.user_id = Some(value);
1204        self
1205    }
1206
1207    /// Sets `volume_id`.
1208    pub fn with_volume_id(mut self, value: i64) -> Self {
1209        self.volume_id = Some(value);
1210        self
1211    }
1212
1213    /// Sets `exp`.
1214    pub fn with_exp(mut self, value: i64) -> Self {
1215        self.exp = Some(value);
1216        self
1217    }
1218}
1219
1220#[derive(Debug, Clone, Serialize, Deserialize)]
1221#[non_exhaustive]
1222pub struct DiscoverEndpoint {
1223    #[serde(rename = "nodeId")]
1224    pub node_id: String,
1225    pub status: String,
1226    #[serde(skip_serializing_if = "Option::is_none")]
1227    pub public: Option<Vec<DiscoverEndpointAddr>>,
1228    #[serde(skip_serializing_if = "Option::is_none")]
1229    pub private: Option<Vec<DiscoverEndpointAddr>>,
1230}
1231
1232#[derive(Debug, Clone, Serialize, Deserialize)]
1233#[non_exhaustive]
1234pub struct DiscoverEndpointAddr {
1235    pub tcp: String,
1236    #[serde(skip_serializing_if = "Option::is_none")]
1237    pub udp: Option<String>,
1238    pub family: i64,
1239}
1240
1241#[derive(Debug, Clone, Serialize, Deserialize)]
1242#[non_exhaustive]
1243pub struct ExclusiveGrant {
1244    #[serde(rename = "sessionId")]
1245    pub session_id: String,
1246    #[serde(rename = "sessionName")]
1247    pub session_name: String,
1248    pub fork: String,
1249    #[serde(rename = "holderIp")]
1250    pub holder_ip: String,
1251    pub path: String,
1252    #[serde(rename = "scopeInode")]
1253    pub scope_inode: String,
1254    pub kind: String,
1255    pub state: String,
1256    pub role: String,
1257    pub durability: String,
1258    #[serde(rename = "takeOverText")]
1259    pub take_over_text: String,
1260    #[serde(rename = "sinceUnixMs")]
1261    pub since_unix_ms: i64,
1262    #[serde(rename = "holderEpoch")]
1263    pub holder_epoch: u64,
1264    #[serde(rename = "windowSeconds")]
1265    pub window_seconds: i32,
1266    #[serde(rename = "standbyPosition")]
1267    pub standby_position: i32,
1268    #[serde(skip_serializing_if = "Option::is_none")]
1269    pub live: Option<bool>,
1270    #[serde(rename = "lastRenewAgeMs", skip_serializing_if = "Option::is_none")]
1271    pub last_renew_age_ms: Option<i64>,
1272    #[serde(rename = "lastSeenAgeMs", skip_serializing_if = "Option::is_none")]
1273    pub last_seen_age_ms: Option<i64>,
1274    #[serde(rename = "fencedSinceUnixMs", skip_serializing_if = "Option::is_none")]
1275    pub fenced_since_unix_ms: Option<i64>,
1276    #[serde(rename = "failoverGraceMs", skip_serializing_if = "Option::is_none")]
1277    pub failover_grace_ms: Option<i64>,
1278}
1279
1280#[derive(Debug, Clone, Serialize, Deserialize)]
1281#[non_exhaustive]
1282pub struct GCWorkerEventBucket {
1283    #[serde(rename = "bucketStart")]
1284    pub bucket_start: String,
1285    pub goal: String,
1286    pub count: i64,
1287}
1288
1289#[derive(Debug, Clone, Serialize, Deserialize)]
1290#[non_exhaustive]
1291pub struct LicenseQuota {
1292    pub state: LicenseQuotaState,
1293    #[serde(rename = "liveVolume")]
1294    pub live_volume: i64,
1295    #[serde(rename = "totalVolume")]
1296    pub total_volume: i64,
1297    pub generation: i64,
1298    #[serde(rename = "lastTransitionAtMs")]
1299    pub last_transition_at_ms: i64,
1300}
1301
1302#[derive(Debug, Clone, Serialize, Deserialize)]
1303#[non_exhaustive]
1304pub struct LicenseRecord {
1305    pub key: String,
1306    pub licensee: String,
1307    pub status: LicenseStatus,
1308    #[serde(rename = "issuedAt")]
1309    pub issued_at: String,
1310    #[serde(rename = "expiresAt")]
1311    pub expires_at: String,
1312    #[serde(rename = "maxStorageBytes")]
1313    pub max_storage_bytes: i64,
1314    #[serde(rename = "insertedAt")]
1315    pub inserted_at: String,
1316}
1317
1318#[derive(Debug, Clone, Serialize, Deserialize)]
1319#[non_exhaustive]
1320pub struct MountDetails {
1321    #[serde(skip_serializing_if = "Option::is_none")]
1322    pub command: Option<String>,
1323    #[serde(rename = "mountPoint", skip_serializing_if = "Option::is_none")]
1324    pub mount_point: Option<String>,
1325    #[serde(skip_serializing_if = "Option::is_none")]
1326    pub args: Option<Vec<String>>,
1327    #[serde(skip_serializing_if = "Option::is_none")]
1328    pub truncated: Option<bool>,
1329    #[serde(rename = "mountOptions", skip_serializing_if = "Option::is_none")]
1330    pub mount_options: Option<Vec<String>>,
1331    #[serde(skip_serializing_if = "Option::is_none")]
1332    pub flags: Option<Vec<MountFlag>>,
1333}
1334
1335#[derive(Debug, Clone, Serialize, Deserialize)]
1336#[non_exhaustive]
1337pub struct MountFlag {
1338    pub name: String,
1339    pub value: String,
1340    #[serde(skip_serializing_if = "Option::is_none")]
1341    pub source: Option<String>,
1342}
1343
1344#[derive(Debug, Clone, Serialize, Deserialize)]
1345#[non_exhaustive]
1346pub struct MoveVolumeFailure {
1347    #[serde(rename = "volumeId")]
1348    pub volume_id: String,
1349    pub error: String,
1350}
1351
1352#[derive(Debug, Clone, Serialize, Deserialize)]
1353#[non_exhaustive]
1354pub struct NodeAddress {
1355    pub family: i64,
1356    pub scope: String,
1357    pub advertise: String,
1358    #[serde(skip_serializing_if = "Option::is_none")]
1359    pub rpc: Option<String>,
1360}
1361
1362#[derive(Debug, Clone, Serialize, Deserialize)]
1363#[non_exhaustive]
1364pub struct NodeStatsSample {
1365    #[serde(rename = "timestampMs")]
1366    pub timestamp_ms: i64,
1367    #[serde(rename = "intervalMs")]
1368    pub interval_ms: i64,
1369    #[serde(rename = "loadAvg1")]
1370    pub load_avg1: f64,
1371    #[serde(rename = "loadAvg5")]
1372    pub load_avg5: f64,
1373    #[serde(rename = "loadAvg15")]
1374    pub load_avg15: f64,
1375    #[serde(rename = "memUsage")]
1376    pub mem_usage: f64,
1377    #[serde(rename = "readIops")]
1378    pub read_iops: f64,
1379    #[serde(rename = "writeIops")]
1380    pub write_iops: f64,
1381    #[serde(rename = "netRxBytesPerSec")]
1382    pub net_rx_bytes_per_sec: f64,
1383    #[serde(rename = "netTxBytesPerSec")]
1384    pub net_tx_bytes_per_sec: f64,
1385    #[serde(rename = "processCount")]
1386    pub process_count: i64,
1387    #[serde(rename = "diskUsedBytes", skip_serializing_if = "Option::is_none")]
1388    pub disk_used_bytes: Option<i64>,
1389    #[serde(rename = "diskTotalBytes", skip_serializing_if = "Option::is_none")]
1390    pub disk_total_bytes: Option<i64>,
1391    #[serde(rename = "dbLatency1mUs", skip_serializing_if = "Option::is_none")]
1392    pub db_latency1m_us: Option<f64>,
1393    #[serde(rename = "dbLatency5mUs", skip_serializing_if = "Option::is_none")]
1394    pub db_latency5m_us: Option<f64>,
1395    #[serde(rename = "dbLatency15mUs", skip_serializing_if = "Option::is_none")]
1396    pub db_latency15m_us: Option<f64>,
1397    #[serde(rename = "dbQueriesPerSec", skip_serializing_if = "Option::is_none")]
1398    pub db_queries_per_sec: Option<f64>,
1399    #[serde(rename = "dbConnsInUse", skip_serializing_if = "Option::is_none")]
1400    pub db_conns_in_use: Option<i64>,
1401    #[serde(rename = "dbConnsMax", skip_serializing_if = "Option::is_none")]
1402    pub db_conns_max: Option<i64>,
1403    #[serde(rename = "dbConnsIdle", skip_serializing_if = "Option::is_none")]
1404    pub db_conns_idle: Option<i64>,
1405    #[serde(rename = "dbConnsFree", skip_serializing_if = "Option::is_none")]
1406    pub db_conns_free: Option<i64>,
1407    #[serde(rename = "dbConnsInUse1m", skip_serializing_if = "Option::is_none")]
1408    pub db_conns_in_use1m: Option<f64>,
1409    #[serde(rename = "dbConnsInUse5m", skip_serializing_if = "Option::is_none")]
1410    pub db_conns_in_use5m: Option<f64>,
1411    #[serde(rename = "dbConnsInUse15m", skip_serializing_if = "Option::is_none")]
1412    pub db_conns_in_use15m: Option<f64>,
1413    #[serde(rename = "dbPingAvgUs", skip_serializing_if = "Option::is_none")]
1414    pub db_ping_avg_us: Option<f64>,
1415    #[serde(rename = "dbPingMinUs", skip_serializing_if = "Option::is_none")]
1416    pub db_ping_min_us: Option<f64>,
1417    #[serde(rename = "dbPingMaxUs", skip_serializing_if = "Option::is_none")]
1418    pub db_ping_max_us: Option<f64>,
1419    #[serde(rename = "dbPingStdDevUs", skip_serializing_if = "Option::is_none")]
1420    pub db_ping_std_dev_us: Option<f64>,
1421    #[serde(rename = "dbDispatchOutstanding", skip_serializing_if = "Option::is_none")]
1422    pub db_dispatch_outstanding: Option<i64>,
1423    #[serde(rename = "dbDispatchLaneCap", skip_serializing_if = "Option::is_none")]
1424    pub db_dispatch_lane_cap: Option<i64>,
1425}
1426
1427#[derive(Debug, Clone, Serialize, Deserialize)]
1428#[non_exhaustive]
1429pub struct Ref {
1430    pub id: i64,
1431    pub name: String,
1432}
1433
1434#[derive(Debug, Clone, Serialize, Deserialize)]
1435#[non_exhaustive]
1436pub struct RegionVolumeMetrics {
1437    #[serde(rename = "regionId")]
1438    pub region_id: i64,
1439    #[serde(rename = "regionName")]
1440    pub region_name: String,
1441    #[serde(rename = "volumeCount")]
1442    pub volume_count: i64,
1443    #[serde(rename = "totalVolumeUsed")]
1444    pub total_volume_used: i64,
1445    #[serde(rename = "totalQuotaLimit")]
1446    pub total_quota_limit: i64,
1447}
1448
1449#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1450#[non_exhaustive]
1451pub struct RetentionPolicy {
1452    #[serde(rename = "clientSessionDays", skip_serializing_if = "Option::is_none")]
1453    pub client_session_days: Option<i32>,
1454}
1455
1456impl RetentionPolicy {
1457    /// Sets `client_session_days`.
1458    pub fn with_client_session_days(mut self, value: i32) -> Self {
1459        self.client_session_days = Some(value);
1460        self
1461    }
1462}
1463
1464#[derive(Debug, Clone, Serialize, Deserialize)]
1465#[non_exhaustive]
1466pub struct SessionSummaryFacet {
1467    pub label: String,
1468    pub count: i64,
1469}
1470
1471#[derive(Debug, Clone, Serialize, Deserialize)]
1472#[non_exhaustive]
1473pub struct SessionSummaryStatusEntry {
1474    #[serde(rename = "clientType")]
1475    pub client_type: String,
1476    pub status: String,
1477    pub count: i64,
1478}
1479
1480#[derive(Debug, Clone, Serialize, Deserialize)]
1481#[non_exhaustive]
1482pub struct UserLite {
1483    pub id: i64,
1484    pub username: String,
1485    pub name: String,
1486}
1487
1488#[derive(Debug, Clone, Serialize, Deserialize)]
1489#[non_exhaustive]
1490pub struct VolumeApiKey {
1491    #[serde(rename = "apiKey")]
1492    pub api_key: String,
1493    #[serde(skip_serializing_if = "Option::is_none")]
1494    pub name: Option<String>,
1495    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
1496    pub created_at: Option<String>,
1497    #[serde(rename = "lastUsedAt", skip_serializing_if = "Option::is_none")]
1498    pub last_used_at: Option<String>,
1499}
1500
1501#[derive(Debug, Clone, Serialize, Deserialize)]
1502#[non_exhaustive]
1503pub struct VolumeRef {
1504    pub id: i64,
1505    pub name: String,
1506    #[serde(skip_serializing_if = "Option::is_none")]
1507    pub r#type: Option<String>,
1508}
1509
1510#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1511#[non_exhaustive]
1512pub struct VolumeRetentionPolicy {
1513    #[serde(rename = "dataDays", skip_serializing_if = "Option::is_none")]
1514    pub data_days: Option<i32>,
1515    #[serde(rename = "graceDays", skip_serializing_if = "Option::is_none")]
1516    pub grace_days: Option<i32>,
1517    #[serde(rename = "forkGraceDays", skip_serializing_if = "Option::is_none")]
1518    pub fork_grace_days: Option<i32>,
1519    #[serde(rename = "eventLogDays", skip_serializing_if = "Option::is_none")]
1520    pub event_log_days: Option<i32>,
1521}
1522
1523impl VolumeRetentionPolicy {
1524    /// Sets `data_days`.
1525    pub fn with_data_days(mut self, value: i32) -> Self {
1526        self.data_days = Some(value);
1527        self
1528    }
1529
1530    /// Sets `grace_days`.
1531    pub fn with_grace_days(mut self, value: i32) -> Self {
1532        self.grace_days = Some(value);
1533        self
1534    }
1535
1536    /// Sets `fork_grace_days`.
1537    pub fn with_fork_grace_days(mut self, value: i32) -> Self {
1538        self.fork_grace_days = Some(value);
1539        self
1540    }
1541
1542    /// Sets `event_log_days`.
1543    pub fn with_event_log_days(mut self, value: i32) -> Self {
1544        self.event_log_days = Some(value);
1545        self
1546    }
1547}
1548
1549#[derive(Debug, Clone, Serialize, Deserialize)]
1550#[non_exhaustive]
1551pub struct VolumeSizePoint {
1552    #[serde(rename = "bucketEnd")]
1553    pub bucket_end: String,
1554    #[serde(rename = "liveVolume")]
1555    pub live_volume: i64,
1556    #[serde(rename = "totalVolume")]
1557    pub total_volume: i64,
1558    #[serde(rename = "pendingVolume")]
1559    pub pending_volume: i64,
1560    #[serde(rename = "liveInactiveVolume")]
1561    pub live_inactive_volume: i64,
1562}
1563
1564#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1565#[non_exhaustive]
1566pub struct VolumeVersioningPolicy {
1567    #[serde(rename = "contentWindowSeconds", skip_serializing_if = "Option::is_none")]
1568    pub content_window_seconds: Option<i32>,
1569}
1570
1571impl VolumeVersioningPolicy {
1572    /// Sets `content_window_seconds`.
1573    pub fn with_content_window_seconds(mut self, value: i32) -> Self {
1574        self.content_window_seconds = Some(value);
1575        self
1576    }
1577}
1578
1579// Accounts
1580
1581#[derive(Debug, Clone, Default, Serialize)]
1582#[non_exhaustive]
1583pub struct CreateAccountRequest {
1584    pub name: String,
1585    #[serde(skip_serializing_if = "Option::is_none")]
1586    pub description: Option<String>,
1587    #[serde(rename = "iconUrl", skip_serializing_if = "Option::is_none")]
1588    pub icon_url: Option<String>,
1589    #[serde(rename = "providerInfo", skip_serializing_if = "Option::is_none")]
1590    pub provider_info: Option<serde_json::Value>,
1591}
1592
1593impl CreateAccountRequest {
1594    /// Builds the value from its required fields. Optional fields start unset.
1595    pub fn new(name: impl Into<String>) -> Self {
1596        Self {
1597            name: name.into(),
1598            description: None,
1599            icon_url: None,
1600            provider_info: None,
1601        }
1602    }
1603
1604    /// Sets `description`.
1605    pub fn with_description(mut self, value: impl Into<String>) -> Self {
1606        self.description = Some(value.into());
1607        self
1608    }
1609
1610    /// Sets `icon_url`.
1611    pub fn with_icon_url(mut self, value: impl Into<String>) -> Self {
1612        self.icon_url = Some(value.into());
1613        self
1614    }
1615
1616    /// Sets `provider_info`.
1617    pub fn with_provider_info(mut self, value: serde_json::Value) -> Self {
1618        self.provider_info = Some(value);
1619        self
1620    }
1621}
1622
1623#[derive(Debug, Clone, Default, Serialize)]
1624#[non_exhaustive]
1625pub struct EditAccountRequest {
1626    pub name: String,
1627    #[serde(skip_serializing_if = "Option::is_none")]
1628    pub description: Option<String>,
1629    #[serde(rename = "iconUrl", skip_serializing_if = "Option::is_none")]
1630    pub icon_url: Option<String>,
1631    #[serde(rename = "providerInfo", skip_serializing_if = "Option::is_none")]
1632    pub provider_info: Option<serde_json::Value>,
1633    #[serde(skip_serializing_if = "Option::is_none")]
1634    pub retention: Option<RetentionPolicy>,
1635}
1636
1637impl EditAccountRequest {
1638    /// Builds the value from its required fields. Optional fields start unset.
1639    pub fn new(name: impl Into<String>) -> Self {
1640        Self {
1641            name: name.into(),
1642            description: None,
1643            icon_url: None,
1644            provider_info: None,
1645            retention: None,
1646        }
1647    }
1648
1649    /// Sets `description`.
1650    pub fn with_description(mut self, value: impl Into<String>) -> Self {
1651        self.description = Some(value.into());
1652        self
1653    }
1654
1655    /// Sets `icon_url`.
1656    pub fn with_icon_url(mut self, value: impl Into<String>) -> Self {
1657        self.icon_url = Some(value.into());
1658        self
1659    }
1660
1661    /// Sets `provider_info`.
1662    pub fn with_provider_info(mut self, value: serde_json::Value) -> Self {
1663        self.provider_info = Some(value);
1664        self
1665    }
1666
1667    /// Sets `retention`.
1668    pub fn with_retention(mut self, value: RetentionPolicy) -> Self {
1669        self.retention = Some(value);
1670        self
1671    }
1672}
1673
1674#[derive(Debug, Clone, Default, Serialize)]
1675#[non_exhaustive]
1676pub struct UpdateAccountQuotaRequest {
1677    #[serde(rename = "quotaLimit")]
1678    pub quota_limit: i64,
1679    #[serde(rename = "quotaExcessPct", skip_serializing_if = "Option::is_none")]
1680    pub quota_excess_pct: Option<i32>,
1681}
1682
1683impl UpdateAccountQuotaRequest {
1684    /// Builds the value from its required fields. Optional fields start unset.
1685    pub fn new(quota_limit: i64) -> Self {
1686        Self {
1687            quota_limit,
1688            quota_excess_pct: None,
1689        }
1690    }
1691
1692    /// Sets `quota_excess_pct`.
1693    pub fn with_quota_excess_pct(mut self, value: i32) -> Self {
1694        self.quota_excess_pct = Some(value);
1695        self
1696    }
1697}
1698
1699#[derive(Debug, Clone, Default)]
1700#[non_exhaustive]
1701pub struct AccountListOptions {
1702    pub is_active: Option<bool>,
1703    pub page: Option<i64>,
1704    pub limit: Option<i64>,
1705}
1706
1707impl AccountListOptions {
1708    /// Sets `is_active`.
1709    pub fn with_is_active(mut self, value: bool) -> Self {
1710        self.is_active = Some(value);
1711        self
1712    }
1713
1714    /// Sets `page`.
1715    pub fn with_page(mut self, value: i64) -> Self {
1716        self.page = Some(value);
1717        self
1718    }
1719
1720    /// Sets `limit`.
1721    pub fn with_limit(mut self, value: i64) -> Self {
1722        self.limit = Some(value);
1723        self
1724    }
1725}
1726
1727// Users
1728
1729#[derive(Debug, Clone, Default, Serialize)]
1730#[non_exhaustive]
1731pub struct AddUserRequest {
1732    #[serde(rename = "accountId")]
1733    pub account_id: i64,
1734    pub username: String,
1735    pub email: String,
1736    #[serde(skip_serializing_if = "Option::is_none")]
1737    pub name: Option<String>,
1738    #[serde(rename = "providerInfo", skip_serializing_if = "Option::is_none")]
1739    pub provider_info: Option<serde_json::Value>,
1740}
1741
1742impl AddUserRequest {
1743    /// Builds the value from its required fields. Optional fields start unset.
1744    pub fn new(account_id: i64, username: impl Into<String>, email: impl Into<String>) -> Self {
1745        Self {
1746            account_id,
1747            username: username.into(),
1748            email: email.into(),
1749            name: None,
1750            provider_info: None,
1751        }
1752    }
1753
1754    /// Sets `name`.
1755    pub fn with_name(mut self, value: impl Into<String>) -> Self {
1756        self.name = Some(value.into());
1757        self
1758    }
1759
1760    /// Sets `provider_info`.
1761    pub fn with_provider_info(mut self, value: serde_json::Value) -> Self {
1762        self.provider_info = Some(value);
1763        self
1764    }
1765}
1766
1767#[derive(Debug, Clone, Default, Serialize)]
1768#[non_exhaustive]
1769pub struct BulkUserRequest {
1770    pub ids: Vec<i64>,
1771}
1772
1773impl BulkUserRequest {
1774    /// Builds the value from its required fields. Optional fields start unset.
1775    pub fn new(ids: Vec<i64>) -> Self {
1776        Self {
1777            ids,
1778        }
1779    }
1780}
1781
1782#[derive(Debug, Clone, Serialize, Deserialize)]
1783#[non_exhaustive]
1784pub struct BulkUserResponse {
1785    pub users: Vec<UserLite>,
1786}
1787
1788#[derive(Debug, Clone, Default, Serialize)]
1789#[non_exhaustive]
1790pub struct EditUserRequest {
1791    pub username: String,
1792    pub email: String,
1793    #[serde(skip_serializing_if = "Option::is_none")]
1794    pub name: Option<String>,
1795    #[serde(rename = "providerInfo", skip_serializing_if = "Option::is_none")]
1796    pub provider_info: Option<serde_json::Value>,
1797}
1798
1799impl EditUserRequest {
1800    /// Builds the value from its required fields. Optional fields start unset.
1801    pub fn new(username: impl Into<String>, email: impl Into<String>) -> Self {
1802        Self {
1803            username: username.into(),
1804            email: email.into(),
1805            name: None,
1806            provider_info: None,
1807        }
1808    }
1809
1810    /// Sets `name`.
1811    pub fn with_name(mut self, value: impl Into<String>) -> Self {
1812        self.name = Some(value.into());
1813        self
1814    }
1815
1816    /// Sets `provider_info`.
1817    pub fn with_provider_info(mut self, value: serde_json::Value) -> Self {
1818        self.provider_info = Some(value);
1819        self
1820    }
1821}
1822
1823#[derive(Debug, Clone, Default)]
1824#[non_exhaustive]
1825pub struct UserListOptions {
1826    pub account_id: i64,
1827    pub search: Option<String>,
1828    pub is_active: Option<bool>,
1829    pub page: Option<i64>,
1830    pub limit: Option<i64>,
1831}
1832
1833impl UserListOptions {
1834    /// Builds the value from its required fields. Optional fields start unset.
1835    pub fn new(account_id: i64) -> Self {
1836        Self {
1837            account_id,
1838            search: None,
1839            is_active: None,
1840            page: None,
1841            limit: None,
1842        }
1843    }
1844
1845    /// Sets `search`.
1846    pub fn with_search(mut self, value: impl Into<String>) -> Self {
1847        self.search = Some(value.into());
1848        self
1849    }
1850
1851    /// Sets `is_active`.
1852    pub fn with_is_active(mut self, value: bool) -> Self {
1853        self.is_active = Some(value);
1854        self
1855    }
1856
1857    /// Sets `page`.
1858    pub fn with_page(mut self, value: i64) -> Self {
1859        self.page = Some(value);
1860        self
1861    }
1862
1863    /// Sets `limit`.
1864    pub fn with_limit(mut self, value: i64) -> Self {
1865        self.limit = Some(value);
1866        self
1867    }
1868}
1869
1870// Regions
1871
1872#[derive(Debug, Clone, Default, Serialize)]
1873#[non_exhaustive]
1874pub struct CreateRegionRequest {
1875    #[serde(rename = "accountId")]
1876    pub account_id: i64,
1877    pub name: String,
1878}
1879
1880impl CreateRegionRequest {
1881    /// Builds the value from its required fields. Optional fields start unset.
1882    pub fn new(account_id: i64, name: impl Into<String>) -> Self {
1883        Self {
1884            account_id,
1885            name: name.into(),
1886        }
1887    }
1888}
1889
1890#[derive(Debug, Clone, Default, Serialize)]
1891#[non_exhaustive]
1892pub struct EditRegionRequest {
1893    #[serde(rename = "accountId")]
1894    pub account_id: i64,
1895    pub name: String,
1896}
1897
1898impl EditRegionRequest {
1899    /// Builds the value from its required fields. Optional fields start unset.
1900    pub fn new(account_id: i64, name: impl Into<String>) -> Self {
1901        Self {
1902            account_id,
1903            name: name.into(),
1904        }
1905    }
1906}
1907
1908#[derive(Debug, Clone, Default)]
1909#[non_exhaustive]
1910pub struct RegionListOptions {
1911    pub account_id: i64,
1912    pub is_active: Option<bool>,
1913    pub page: Option<i64>,
1914    pub limit: Option<i64>,
1915}
1916
1917impl RegionListOptions {
1918    /// Builds the value from its required fields. Optional fields start unset.
1919    pub fn new(account_id: i64) -> Self {
1920        Self {
1921            account_id,
1922            is_active: None,
1923            page: None,
1924            limit: None,
1925        }
1926    }
1927
1928    /// Sets `is_active`.
1929    pub fn with_is_active(mut self, value: bool) -> Self {
1930        self.is_active = Some(value);
1931        self
1932    }
1933
1934    /// Sets `page`.
1935    pub fn with_page(mut self, value: i64) -> Self {
1936        self.page = Some(value);
1937        self
1938    }
1939
1940    /// Sets `limit`.
1941    pub fn with_limit(mut self, value: i64) -> Self {
1942        self.limit = Some(value);
1943        self
1944    }
1945}
1946
1947// Clusters
1948
1949#[derive(Debug, Clone, Default)]
1950#[non_exhaustive]
1951pub struct ClusterListOptions {
1952    pub account_id: i64,
1953    pub region_id: Option<i64>,
1954    pub is_active: Option<bool>,
1955    pub page: Option<i64>,
1956    pub limit: Option<i64>,
1957}
1958
1959impl ClusterListOptions {
1960    /// Builds the value from its required fields. Optional fields start unset.
1961    pub fn new(account_id: i64) -> Self {
1962        Self {
1963            account_id,
1964            region_id: None,
1965            is_active: None,
1966            page: None,
1967            limit: None,
1968        }
1969    }
1970
1971    /// Sets `region_id`.
1972    pub fn with_region_id(mut self, value: i64) -> Self {
1973        self.region_id = Some(value);
1974        self
1975    }
1976
1977    /// Sets `is_active`.
1978    pub fn with_is_active(mut self, value: bool) -> Self {
1979        self.is_active = Some(value);
1980        self
1981    }
1982
1983    /// Sets `page`.
1984    pub fn with_page(mut self, value: i64) -> Self {
1985        self.page = Some(value);
1986        self
1987    }
1988
1989    /// Sets `limit`.
1990    pub fn with_limit(mut self, value: i64) -> Self {
1991        self.limit = Some(value);
1992        self
1993    }
1994}
1995
1996// MetadataClusters
1997
1998#[derive(Debug, Clone, Default, Serialize)]
1999#[non_exhaustive]
2000pub struct CreateMetadataClusterRequest {
2001    pub name: String,
2002}
2003
2004impl CreateMetadataClusterRequest {
2005    /// Builds the value from its required fields. Optional fields start unset.
2006    pub fn new(name: impl Into<String>) -> Self {
2007        Self {
2008            name: name.into(),
2009        }
2010    }
2011}
2012
2013#[derive(Debug, Clone, Default, Serialize)]
2014#[non_exhaustive]
2015pub struct EditMetadataClusterRequest {
2016    pub name: String,
2017}
2018
2019impl EditMetadataClusterRequest {
2020    /// Builds the value from its required fields. Optional fields start unset.
2021    pub fn new(name: impl Into<String>) -> Self {
2022        Self {
2023            name: name.into(),
2024        }
2025    }
2026}
2027
2028#[derive(Debug, Clone, Default, Serialize)]
2029#[non_exhaustive]
2030pub struct SetMetadataClusterReadyRequest {
2031    pub ready: bool,
2032}
2033
2034impl SetMetadataClusterReadyRequest {
2035    /// Builds the value from its required fields. Optional fields start unset.
2036    pub fn new(ready: bool) -> Self {
2037        Self {
2038            ready,
2039        }
2040    }
2041}
2042
2043#[derive(Debug, Clone, Serialize, Deserialize)]
2044#[non_exhaustive]
2045pub struct SetReadyMetadataClusterResponse {
2046    pub id: i64,
2047    pub ready: bool,
2048}
2049
2050#[derive(Debug, Clone, Default)]
2051#[non_exhaustive]
2052pub struct MetadataClusterListOptions {
2053    pub is_active: Option<bool>,
2054    pub page: Option<i64>,
2055    pub limit: Option<i64>,
2056}
2057
2058impl MetadataClusterListOptions {
2059    /// Sets `is_active`.
2060    pub fn with_is_active(mut self, value: bool) -> Self {
2061        self.is_active = Some(value);
2062        self
2063    }
2064
2065    /// Sets `page`.
2066    pub fn with_page(mut self, value: i64) -> Self {
2067        self.page = Some(value);
2068        self
2069    }
2070
2071    /// Sets `limit`.
2072    pub fn with_limit(mut self, value: i64) -> Self {
2073        self.limit = Some(value);
2074        self
2075    }
2076}
2077
2078// Storages
2079
2080#[derive(Debug, Clone, Default, Serialize)]
2081#[non_exhaustive]
2082pub struct CreateStorageRequest {
2083    #[serde(rename = "accountId")]
2084    pub account_id: i64,
2085    #[serde(rename = "regionId")]
2086    pub region_id: i64,
2087    pub name: String,
2088    #[serde(skip_serializing_if = "Option::is_none")]
2089    pub description: Option<String>,
2090    #[serde(rename = "storageType")]
2091    pub storage_type: String,
2092    #[serde(rename = "providerType")]
2093    pub provider_type: String,
2094    pub endpoint: String,
2095    #[serde(skip_serializing_if = "Option::is_none")]
2096    pub region: Option<String>,
2097    #[serde(skip_serializing_if = "Option::is_none")]
2098    pub bucket: Option<String>,
2099    #[serde(skip_serializing_if = "Option::is_none")]
2100    pub base: Option<String>,
2101    #[serde(rename = "blockRegion", skip_serializing_if = "Option::is_none")]
2102    pub block_region: Option<String>,
2103    #[serde(rename = "blockSize", skip_serializing_if = "Option::is_none")]
2104    pub block_size: Option<i32>,
2105    #[serde(rename = "accessKey", skip_serializing_if = "Option::is_none")]
2106    pub access_key: Option<String>,
2107    #[serde(rename = "secretKey", skip_serializing_if = "Option::is_none")]
2108    pub secret_key: Option<String>,
2109}
2110
2111impl CreateStorageRequest {
2112    /// Builds the value from its required fields. Optional fields start unset.
2113    pub fn new(account_id: i64, region_id: i64, name: impl Into<String>, storage_type: impl Into<String>, provider_type: impl Into<String>, endpoint: impl Into<String>) -> Self {
2114        Self {
2115            account_id,
2116            region_id,
2117            name: name.into(),
2118            storage_type: storage_type.into(),
2119            provider_type: provider_type.into(),
2120            endpoint: endpoint.into(),
2121            description: None,
2122            region: None,
2123            bucket: None,
2124            base: None,
2125            block_region: None,
2126            block_size: None,
2127            access_key: None,
2128            secret_key: None,
2129        }
2130    }
2131
2132    /// Sets `description`.
2133    pub fn with_description(mut self, value: impl Into<String>) -> Self {
2134        self.description = Some(value.into());
2135        self
2136    }
2137
2138    /// Sets `region`.
2139    pub fn with_region(mut self, value: impl Into<String>) -> Self {
2140        self.region = Some(value.into());
2141        self
2142    }
2143
2144    /// Sets `bucket`.
2145    pub fn with_bucket(mut self, value: impl Into<String>) -> Self {
2146        self.bucket = Some(value.into());
2147        self
2148    }
2149
2150    /// Sets `base`.
2151    pub fn with_base(mut self, value: impl Into<String>) -> Self {
2152        self.base = Some(value.into());
2153        self
2154    }
2155
2156    /// Sets `block_region`.
2157    pub fn with_block_region(mut self, value: impl Into<String>) -> Self {
2158        self.block_region = Some(value.into());
2159        self
2160    }
2161
2162    /// Sets `block_size`.
2163    pub fn with_block_size(mut self, value: i32) -> Self {
2164        self.block_size = Some(value);
2165        self
2166    }
2167
2168    /// Sets `access_key`.
2169    pub fn with_access_key(mut self, value: impl Into<String>) -> Self {
2170        self.access_key = Some(value.into());
2171        self
2172    }
2173
2174    /// Sets `secret_key`.
2175    pub fn with_secret_key(mut self, value: impl Into<String>) -> Self {
2176        self.secret_key = Some(value.into());
2177        self
2178    }
2179}
2180
2181#[derive(Debug, Clone, Default, Serialize)]
2182#[non_exhaustive]
2183pub struct EditStorageRequest {
2184    pub name: String,
2185    #[serde(skip_serializing_if = "Option::is_none")]
2186    pub description: Option<String>,
2187    #[serde(skip_serializing_if = "Option::is_none")]
2188    pub endpoint: Option<String>,
2189    #[serde(rename = "accessKey", skip_serializing_if = "Option::is_none")]
2190    pub access_key: Option<String>,
2191    #[serde(rename = "secretKey", skip_serializing_if = "Option::is_none")]
2192    pub secret_key: Option<String>,
2193    #[serde(rename = "directAccess", skip_serializing_if = "Option::is_none")]
2194    pub direct_access: Option<bool>,
2195}
2196
2197impl EditStorageRequest {
2198    /// Builds the value from its required fields. Optional fields start unset.
2199    pub fn new(name: impl Into<String>) -> Self {
2200        Self {
2201            name: name.into(),
2202            description: None,
2203            endpoint: None,
2204            access_key: None,
2205            secret_key: None,
2206            direct_access: None,
2207        }
2208    }
2209
2210    /// Sets `description`.
2211    pub fn with_description(mut self, value: impl Into<String>) -> Self {
2212        self.description = Some(value.into());
2213        self
2214    }
2215
2216    /// Sets `endpoint`.
2217    pub fn with_endpoint(mut self, value: impl Into<String>) -> Self {
2218        self.endpoint = Some(value.into());
2219        self
2220    }
2221
2222    /// Sets `access_key`.
2223    pub fn with_access_key(mut self, value: impl Into<String>) -> Self {
2224        self.access_key = Some(value.into());
2225        self
2226    }
2227
2228    /// Sets `secret_key`.
2229    pub fn with_secret_key(mut self, value: impl Into<String>) -> Self {
2230        self.secret_key = Some(value.into());
2231        self
2232    }
2233
2234    /// Sets `direct_access`.
2235    pub fn with_direct_access(mut self, value: bool) -> Self {
2236        self.direct_access = Some(value);
2237        self
2238    }
2239}
2240
2241#[derive(Debug, Clone, Default, Serialize)]
2242#[non_exhaustive]
2243pub struct TestStorageNewBucketRequest {
2244    pub endpoint: String,
2245    #[serde(skip_serializing_if = "Option::is_none")]
2246    pub region: Option<String>,
2247    pub bucket: String,
2248    #[serde(rename = "accessKey")]
2249    pub access_key: String,
2250    #[serde(rename = "secretKey")]
2251    pub secret_key: String,
2252    #[serde(rename = "providerType", skip_serializing_if = "Option::is_none")]
2253    pub provider_type: Option<String>,
2254}
2255
2256impl TestStorageNewBucketRequest {
2257    /// Builds the value from its required fields. Optional fields start unset.
2258    pub fn new(endpoint: impl Into<String>, bucket: impl Into<String>, access_key: impl Into<String>, secret_key: impl Into<String>) -> Self {
2259        Self {
2260            endpoint: endpoint.into(),
2261            bucket: bucket.into(),
2262            access_key: access_key.into(),
2263            secret_key: secret_key.into(),
2264            region: None,
2265            provider_type: None,
2266        }
2267    }
2268
2269    /// Sets `region`.
2270    pub fn with_region(mut self, value: impl Into<String>) -> Self {
2271        self.region = Some(value.into());
2272        self
2273    }
2274
2275    /// Sets `provider_type`.
2276    pub fn with_provider_type(mut self, value: impl Into<String>) -> Self {
2277        self.provider_type = Some(value.into());
2278        self
2279    }
2280}
2281
2282#[derive(Debug, Clone, Serialize, Deserialize)]
2283#[non_exhaustive]
2284pub struct TestNewBucketStorageResponse {
2285    #[serde(rename = "bucketExists")]
2286    pub bucket_exists: bool,
2287    pub list: bool,
2288    pub write: bool,
2289    pub read: bool,
2290    pub delete: bool,
2291    pub multipart: bool,
2292}
2293
2294#[derive(Debug, Clone, Serialize, Deserialize)]
2295#[non_exhaustive]
2296pub struct TestStorageBucketStorageResponse {
2297    #[serde(rename = "bucketExists")]
2298    pub bucket_exists: bool,
2299    pub list: bool,
2300    pub write: bool,
2301    pub read: bool,
2302    pub delete: bool,
2303    pub multipart: bool,
2304}
2305
2306#[derive(Debug, Clone, Serialize, Deserialize)]
2307#[non_exhaustive]
2308pub struct ListCompatibleStorageResponse {
2309    pub storages: Vec<CompatibleStorage>,
2310}
2311
2312#[derive(Debug, Clone, Default, Serialize)]
2313#[non_exhaustive]
2314pub struct MoveStorageVolumesRequest {
2315    #[serde(rename = "volumeIds")]
2316    pub volume_ids: Vec<String>,
2317}
2318
2319impl MoveStorageVolumesRequest {
2320    /// Builds the value from its required fields. Optional fields start unset.
2321    pub fn new(volume_ids: Vec<String>) -> Self {
2322        Self {
2323            volume_ids,
2324        }
2325    }
2326}
2327
2328#[derive(Debug, Clone, Serialize, Deserialize)]
2329#[non_exhaustive]
2330pub struct MoveVolumesStorageResponse {
2331    pub moved: Vec<String>,
2332    pub failures: Vec<MoveVolumeFailure>,
2333}
2334
2335#[derive(Debug, Clone, Default, Serialize)]
2336#[non_exhaustive]
2337pub struct DrainStorageCopysetRequest {
2338    #[serde(skip_serializing_if = "Option::is_none")]
2339    pub force: Option<bool>,
2340}
2341
2342impl DrainStorageCopysetRequest {
2343    /// Sets `force`.
2344    pub fn with_force(mut self, value: bool) -> Self {
2345        self.force = Some(value);
2346        self
2347    }
2348}
2349
2350#[derive(Debug, Clone, Serialize, Deserialize)]
2351#[non_exhaustive]
2352pub struct DrainCopysetStorageResponse {
2353    pub id: String,
2354    pub state: String,
2355}
2356
2357#[derive(Debug, Clone, Default, Serialize)]
2358#[non_exhaustive]
2359pub struct CancelStorageDrainRequest {
2360    #[serde(skip_serializing_if = "Option::is_none")]
2361    pub force: Option<bool>,
2362}
2363
2364impl CancelStorageDrainRequest {
2365    /// Sets `force`.
2366    pub fn with_force(mut self, value: bool) -> Self {
2367        self.force = Some(value);
2368        self
2369    }
2370}
2371
2372#[derive(Debug, Clone, Serialize, Deserialize)]
2373#[non_exhaustive]
2374pub struct CancelDrainStorageResponse {
2375    pub id: String,
2376    pub state: String,
2377}
2378
2379#[derive(Debug, Clone, Default, Serialize)]
2380#[non_exhaustive]
2381pub struct UpdateStorageTagsRequest {
2382    #[serde(skip_serializing_if = "Option::is_none")]
2383    pub tags: Option<Vec<String>>,
2384}
2385
2386impl UpdateStorageTagsRequest {
2387    /// Sets `tags`.
2388    pub fn with_tags(mut self, value: Vec<String>) -> Self {
2389        self.tags = Some(value);
2390        self
2391    }
2392}
2393
2394#[derive(Debug, Clone, Default, Serialize)]
2395#[non_exhaustive]
2396pub struct RegisterStorageCopysetRequest {
2397    #[serde(skip_serializing_if = "Option::is_none")]
2398    pub name: Option<String>,
2399    #[serde(rename = "failureDomainA", skip_serializing_if = "Option::is_none")]
2400    pub failure_domain_a: Option<String>,
2401    #[serde(rename = "failureDomainB", skip_serializing_if = "Option::is_none")]
2402    pub failure_domain_b: Option<String>,
2403}
2404
2405impl RegisterStorageCopysetRequest {
2406    /// Sets `name`.
2407    pub fn with_name(mut self, value: impl Into<String>) -> Self {
2408        self.name = Some(value.into());
2409        self
2410    }
2411
2412    /// Sets `failure_domain_a`.
2413    pub fn with_failure_domain_a(mut self, value: impl Into<String>) -> Self {
2414        self.failure_domain_a = Some(value.into());
2415        self
2416    }
2417
2418    /// Sets `failure_domain_b`.
2419    pub fn with_failure_domain_b(mut self, value: impl Into<String>) -> Self {
2420        self.failure_domain_b = Some(value.into());
2421        self
2422    }
2423}
2424
2425#[derive(Debug, Clone, Default, Serialize)]
2426#[non_exhaustive]
2427pub struct RegisterStorageCopysetsBulkRequest {
2428    pub count: i32,
2429    #[serde(rename = "failureDomainA", skip_serializing_if = "Option::is_none")]
2430    pub failure_domain_a: Option<String>,
2431    #[serde(rename = "failureDomainB", skip_serializing_if = "Option::is_none")]
2432    pub failure_domain_b: Option<String>,
2433}
2434
2435impl RegisterStorageCopysetsBulkRequest {
2436    /// Builds the value from its required fields. Optional fields start unset.
2437    pub fn new(count: i32) -> Self {
2438        Self {
2439            count,
2440            failure_domain_a: None,
2441            failure_domain_b: None,
2442        }
2443    }
2444
2445    /// Sets `failure_domain_a`.
2446    pub fn with_failure_domain_a(mut self, value: impl Into<String>) -> Self {
2447        self.failure_domain_a = Some(value.into());
2448        self
2449    }
2450
2451    /// Sets `failure_domain_b`.
2452    pub fn with_failure_domain_b(mut self, value: impl Into<String>) -> Self {
2453        self.failure_domain_b = Some(value.into());
2454        self
2455    }
2456}
2457
2458#[derive(Debug, Clone, Serialize, Deserialize)]
2459#[non_exhaustive]
2460pub struct RegisterCopysetsBulkStorageResponse {
2461    pub copysets: Vec<Copyset>,
2462}
2463
2464#[derive(Debug, Clone, Default, Serialize)]
2465#[non_exhaustive]
2466pub struct AddStorageCopysetMemberRequest {
2467    #[serde(rename = "failureDomain", skip_serializing_if = "Option::is_none")]
2468    pub failure_domain: Option<String>,
2469}
2470
2471impl AddStorageCopysetMemberRequest {
2472    /// Sets `failure_domain`.
2473    pub fn with_failure_domain(mut self, value: impl Into<String>) -> Self {
2474        self.failure_domain = Some(value.into());
2475        self
2476    }
2477}
2478
2479#[derive(Debug, Clone, Default, Serialize)]
2480#[non_exhaustive]
2481pub struct MarkStorageMemberLostRequest {
2482    #[serde(rename = "blockVolumeId")]
2483    pub block_volume_id: String,
2484    #[serde(skip_serializing_if = "Option::is_none")]
2485    pub force: Option<bool>,
2486}
2487
2488impl MarkStorageMemberLostRequest {
2489    /// Builds the value from its required fields. Optional fields start unset.
2490    pub fn new(block_volume_id: impl Into<String>) -> Self {
2491        Self {
2492            block_volume_id: block_volume_id.into(),
2493            force: None,
2494        }
2495    }
2496
2497    /// Sets `force`.
2498    pub fn with_force(mut self, value: bool) -> Self {
2499        self.force = Some(value);
2500        self
2501    }
2502}
2503
2504#[derive(Debug, Clone, Serialize, Deserialize)]
2505#[non_exhaustive]
2506pub struct RemoveMemberStorageResponse {
2507    pub id: String,
2508}
2509
2510#[derive(Debug, Clone, Serialize, Deserialize)]
2511#[non_exhaustive]
2512pub struct BackfillFingerprintsStorageResponse {
2513    pub scanned: i32,
2514    pub updated: i32,
2515    pub failures: Vec<BackfillFailure>,
2516    #[serde(rename = "hasMore")]
2517    pub has_more: bool,
2518}
2519
2520#[derive(Debug, Clone, Default)]
2521#[non_exhaustive]
2522pub struct StorageListOptions {
2523    pub account_id: i64,
2524    pub search: Option<String>,
2525    pub region_id: Option<i64>,
2526    pub storage_type: Option<String>,
2527    pub provider_type: Option<String>,
2528    pub is_active: Option<bool>,
2529    pub direct_access: Option<bool>,
2530    pub page: Option<i64>,
2531    pub limit: Option<i64>,
2532}
2533
2534impl StorageListOptions {
2535    /// Builds the value from its required fields. Optional fields start unset.
2536    pub fn new(account_id: i64) -> Self {
2537        Self {
2538            account_id,
2539            search: None,
2540            region_id: None,
2541            storage_type: None,
2542            provider_type: None,
2543            is_active: None,
2544            direct_access: None,
2545            page: None,
2546            limit: None,
2547        }
2548    }
2549
2550    /// Sets `search`.
2551    pub fn with_search(mut self, value: impl Into<String>) -> Self {
2552        self.search = Some(value.into());
2553        self
2554    }
2555
2556    /// Sets `region_id`.
2557    pub fn with_region_id(mut self, value: i64) -> Self {
2558        self.region_id = Some(value);
2559        self
2560    }
2561
2562    /// Sets `storage_type`.
2563    pub fn with_storage_type(mut self, value: impl Into<String>) -> Self {
2564        self.storage_type = Some(value.into());
2565        self
2566    }
2567
2568    /// Sets `provider_type`.
2569    pub fn with_provider_type(mut self, value: impl Into<String>) -> Self {
2570        self.provider_type = Some(value.into());
2571        self
2572    }
2573
2574    /// Sets `is_active`.
2575    pub fn with_is_active(mut self, value: bool) -> Self {
2576        self.is_active = Some(value);
2577        self
2578    }
2579
2580    /// Sets `direct_access`.
2581    pub fn with_direct_access(mut self, value: bool) -> Self {
2582        self.direct_access = Some(value);
2583        self
2584    }
2585
2586    /// Sets `page`.
2587    pub fn with_page(mut self, value: i64) -> Self {
2588        self.page = Some(value);
2589        self
2590    }
2591
2592    /// Sets `limit`.
2593    pub fn with_limit(mut self, value: i64) -> Self {
2594        self.limit = Some(value);
2595        self
2596    }
2597}
2598
2599// Volumes
2600
2601#[derive(Debug, Clone, Default, Serialize)]
2602#[non_exhaustive]
2603pub struct CreateVolumeRequest {
2604    #[serde(rename = "accountId")]
2605    pub account_id: i64,
2606    #[serde(rename = "storageId")]
2607    pub storage_id: i64,
2608    pub name: String,
2609    #[serde(skip_serializing_if = "Option::is_none")]
2610    pub description: Option<String>,
2611    #[serde(rename = "volumeType")]
2612    pub volume_type: String,
2613    #[serde(skip_serializing_if = "Option::is_none")]
2614    pub encryption: Option<bool>,
2615    #[serde(rename = "encryptionKey", skip_serializing_if = "Option::is_none")]
2616    pub encryption_key: Option<String>,
2617    #[serde(skip_serializing_if = "Option::is_none")]
2618    pub retention: Option<VolumeRetentionPolicy>,
2619    #[serde(skip_serializing_if = "Option::is_none")]
2620    pub versioning: Option<VolumeVersioningPolicy>,
2621    #[serde(skip_serializing_if = "Option::is_none")]
2622    pub compaction: Option<String>,
2623    #[serde(rename = "quotaLimit", skip_serializing_if = "Option::is_none")]
2624    pub quota_limit: Option<i64>,
2625    #[serde(rename = "metadataClusterId", skip_serializing_if = "Option::is_none")]
2626    pub metadata_cluster_id: Option<i64>,
2627    #[serde(rename = "metadataClusterUuid", skip_serializing_if = "Option::is_none")]
2628    pub metadata_cluster_uuid: Option<String>,
2629}
2630
2631impl CreateVolumeRequest {
2632    /// Builds the value from its required fields. Optional fields start unset.
2633    pub fn new(account_id: i64, storage_id: i64, name: impl Into<String>, volume_type: impl Into<String>) -> Self {
2634        Self {
2635            account_id,
2636            storage_id,
2637            name: name.into(),
2638            volume_type: volume_type.into(),
2639            description: None,
2640            encryption: None,
2641            encryption_key: None,
2642            retention: None,
2643            versioning: None,
2644            compaction: None,
2645            quota_limit: None,
2646            metadata_cluster_id: None,
2647            metadata_cluster_uuid: None,
2648        }
2649    }
2650
2651    /// Sets `description`.
2652    pub fn with_description(mut self, value: impl Into<String>) -> Self {
2653        self.description = Some(value.into());
2654        self
2655    }
2656
2657    /// Sets `encryption`.
2658    pub fn with_encryption(mut self, value: bool) -> Self {
2659        self.encryption = Some(value);
2660        self
2661    }
2662
2663    /// Sets `encryption_key`.
2664    pub fn with_encryption_key(mut self, value: impl Into<String>) -> Self {
2665        self.encryption_key = Some(value.into());
2666        self
2667    }
2668
2669    /// Sets `retention`.
2670    pub fn with_retention(mut self, value: VolumeRetentionPolicy) -> Self {
2671        self.retention = Some(value);
2672        self
2673    }
2674
2675    /// Sets `versioning`.
2676    pub fn with_versioning(mut self, value: VolumeVersioningPolicy) -> Self {
2677        self.versioning = Some(value);
2678        self
2679    }
2680
2681    /// Sets `compaction`.
2682    pub fn with_compaction(mut self, value: impl Into<String>) -> Self {
2683        self.compaction = Some(value.into());
2684        self
2685    }
2686
2687    /// Sets `quota_limit`.
2688    pub fn with_quota_limit(mut self, value: i64) -> Self {
2689        self.quota_limit = Some(value);
2690        self
2691    }
2692
2693    /// Sets `metadata_cluster_id`.
2694    pub fn with_metadata_cluster_id(mut self, value: i64) -> Self {
2695        self.metadata_cluster_id = Some(value);
2696        self
2697    }
2698
2699    /// Sets `metadata_cluster_uuid`.
2700    pub fn with_metadata_cluster_uuid(mut self, value: impl Into<String>) -> Self {
2701        self.metadata_cluster_uuid = Some(value.into());
2702        self
2703    }
2704}
2705
2706#[derive(Debug, Clone, Serialize, Deserialize)]
2707#[non_exhaustive]
2708pub struct CreateVolumeResponse {
2709    pub id: i64,
2710    #[serde(rename = "encryptionKey", skip_serializing_if = "Option::is_none")]
2711    pub encryption_key: Option<String>,
2712}
2713
2714#[derive(Debug, Clone, Default, Serialize)]
2715#[non_exhaustive]
2716pub struct EditVolumeRequest {
2717    #[serde(skip_serializing_if = "Option::is_none")]
2718    pub description: Option<String>,
2719    #[serde(skip_serializing_if = "Option::is_none")]
2720    pub retention: Option<VolumeRetentionPolicy>,
2721    #[serde(skip_serializing_if = "Option::is_none")]
2722    pub versioning: Option<VolumeVersioningPolicy>,
2723    #[serde(skip_serializing_if = "Option::is_none")]
2724    pub compaction: Option<String>,
2725}
2726
2727impl EditVolumeRequest {
2728    /// Sets `description`.
2729    pub fn with_description(mut self, value: impl Into<String>) -> Self {
2730        self.description = Some(value.into());
2731        self
2732    }
2733
2734    /// Sets `retention`.
2735    pub fn with_retention(mut self, value: VolumeRetentionPolicy) -> Self {
2736        self.retention = Some(value);
2737        self
2738    }
2739
2740    /// Sets `versioning`.
2741    pub fn with_versioning(mut self, value: VolumeVersioningPolicy) -> Self {
2742        self.versioning = Some(value);
2743        self
2744    }
2745
2746    /// Sets `compaction`.
2747    pub fn with_compaction(mut self, value: impl Into<String>) -> Self {
2748        self.compaction = Some(value.into());
2749        self
2750    }
2751}
2752
2753#[derive(Debug, Clone, Default, Serialize)]
2754#[non_exhaustive]
2755pub struct MoveVolumeClusterRequest {
2756    #[serde(rename = "targetClusterId", skip_serializing_if = "Option::is_none")]
2757    pub target_cluster_id: Option<i64>,
2758    #[serde(rename = "targetClusterUuid", skip_serializing_if = "Option::is_none")]
2759    pub target_cluster_uuid: Option<String>,
2760}
2761
2762impl MoveVolumeClusterRequest {
2763    /// Sets `target_cluster_id`.
2764    pub fn with_target_cluster_id(mut self, value: i64) -> Self {
2765        self.target_cluster_id = Some(value);
2766        self
2767    }
2768
2769    /// Sets `target_cluster_uuid`.
2770    pub fn with_target_cluster_uuid(mut self, value: impl Into<String>) -> Self {
2771        self.target_cluster_uuid = Some(value.into());
2772        self
2773    }
2774}
2775
2776#[derive(Debug, Clone, Serialize, Deserialize)]
2777#[non_exhaustive]
2778pub struct MoveClusterVolumeResponse {
2779    pub id: i64,
2780    #[serde(rename = "sourceClusterId")]
2781    pub source_cluster_id: i64,
2782    #[serde(rename = "targetClusterId")]
2783    pub target_cluster_id: i64,
2784    #[serde(rename = "handoverUntil")]
2785    pub handover_until: i64,
2786}
2787
2788#[derive(Debug, Clone, Default, Serialize)]
2789#[non_exhaustive]
2790pub struct DeactivateVolumeRequest {
2791    #[serde(rename = "isCleanupMetaEnabled", skip_serializing_if = "Option::is_none")]
2792    pub is_cleanup_meta_enabled: Option<bool>,
2793    #[serde(rename = "isCleanupStorageEnabled", skip_serializing_if = "Option::is_none")]
2794    pub is_cleanup_storage_enabled: Option<bool>,
2795    #[serde(rename = "isCleanupVaultEnabled", skip_serializing_if = "Option::is_none")]
2796    pub is_cleanup_vault_enabled: Option<bool>,
2797}
2798
2799impl DeactivateVolumeRequest {
2800    /// Sets `is_cleanup_meta_enabled`.
2801    pub fn with_is_cleanup_meta_enabled(mut self, value: bool) -> Self {
2802        self.is_cleanup_meta_enabled = Some(value);
2803        self
2804    }
2805
2806    /// Sets `is_cleanup_storage_enabled`.
2807    pub fn with_is_cleanup_storage_enabled(mut self, value: bool) -> Self {
2808        self.is_cleanup_storage_enabled = Some(value);
2809        self
2810    }
2811
2812    /// Sets `is_cleanup_vault_enabled`.
2813    pub fn with_is_cleanup_vault_enabled(mut self, value: bool) -> Self {
2814        self.is_cleanup_vault_enabled = Some(value);
2815        self
2816    }
2817}
2818
2819#[derive(Debug, Clone, Default, Serialize)]
2820#[non_exhaustive]
2821pub struct GenerateVolumeAPIKeysRequest {
2822    #[serde(rename = "userId")]
2823    pub user_id: i64,
2824    #[serde(skip_serializing_if = "Option::is_none")]
2825    pub name: Option<String>,
2826}
2827
2828impl GenerateVolumeAPIKeysRequest {
2829    /// Builds the value from its required fields. Optional fields start unset.
2830    pub fn new(user_id: i64) -> Self {
2831        Self {
2832            user_id,
2833            name: None,
2834        }
2835    }
2836
2837    /// Sets `name`.
2838    pub fn with_name(mut self, value: impl Into<String>) -> Self {
2839        self.name = Some(value.into());
2840        self
2841    }
2842}
2843
2844#[derive(Debug, Clone, Serialize, Deserialize)]
2845#[non_exhaustive]
2846pub struct GenerateAPIKeysVolumeResponse {
2847    #[serde(rename = "apiKey")]
2848    pub api_key: String,
2849    #[serde(rename = "apiSecret")]
2850    pub api_secret: String,
2851    #[serde(rename = "evictedApiKeys", skip_serializing_if = "Option::is_none")]
2852    pub evicted_api_keys: Option<Vec<String>>,
2853}
2854
2855#[derive(Debug, Clone, Serialize, Deserialize)]
2856#[non_exhaustive]
2857pub struct ListAPIKeysVolumeResponse {
2858    pub keys: Vec<VolumeApiKey>,
2859}
2860
2861#[derive(Debug, Clone, Default, Serialize)]
2862#[non_exhaustive]
2863pub struct RevokeVolumeAPIKeyRequest {
2864    #[serde(rename = "apiKey")]
2865    pub api_key: String,
2866}
2867
2868impl RevokeVolumeAPIKeyRequest {
2869    /// Builds the value from its required fields. Optional fields start unset.
2870    pub fn new(api_key: impl Into<String>) -> Self {
2871        Self {
2872            api_key: api_key.into(),
2873        }
2874    }
2875}
2876
2877#[derive(Debug, Clone, Default, Serialize)]
2878#[non_exhaustive]
2879pub struct RevokeVolumeAPIKeysByUserRequest {
2880    #[serde(rename = "userId")]
2881    pub user_id: i64,
2882}
2883
2884impl RevokeVolumeAPIKeysByUserRequest {
2885    /// Builds the value from its required fields. Optional fields start unset.
2886    pub fn new(user_id: i64) -> Self {
2887        Self {
2888            user_id,
2889        }
2890    }
2891}
2892
2893#[derive(Debug, Clone, Default, Serialize)]
2894#[non_exhaustive]
2895pub struct GenerateVolumeSttKeyRequest {
2896    #[serde(rename = "userId", skip_serializing_if = "Option::is_none")]
2897    pub user_id: Option<i64>,
2898    #[serde(rename = "expirySeconds")]
2899    pub expiry_seconds: i64,
2900}
2901
2902impl GenerateVolumeSttKeyRequest {
2903    /// Builds the value from its required fields. Optional fields start unset.
2904    pub fn new(expiry_seconds: i64) -> Self {
2905        Self {
2906            expiry_seconds,
2907            user_id: None,
2908        }
2909    }
2910
2911    /// Sets `user_id`.
2912    pub fn with_user_id(mut self, value: i64) -> Self {
2913        self.user_id = Some(value);
2914        self
2915    }
2916}
2917
2918#[derive(Debug, Clone, Serialize, Deserialize)]
2919#[non_exhaustive]
2920pub struct GenerateSttKeyVolumeResponse {
2921    #[serde(rename = "apiKey")]
2922    pub api_key: String,
2923    #[serde(rename = "apiSecret")]
2924    pub api_secret: String,
2925    #[serde(rename = "expiresAt")]
2926    pub expires_at: String,
2927}
2928
2929#[derive(Debug, Clone, Default, Serialize)]
2930#[non_exhaustive]
2931pub struct UpdateVolumeQuotaRequest {
2932    #[serde(rename = "quotaLimit")]
2933    pub quota_limit: i64,
2934}
2935
2936impl UpdateVolumeQuotaRequest {
2937    /// Builds the value from its required fields. Optional fields start unset.
2938    pub fn new(quota_limit: i64) -> Self {
2939        Self {
2940            quota_limit,
2941        }
2942    }
2943}
2944
2945#[derive(Debug, Clone, Default, Serialize)]
2946#[non_exhaustive]
2947pub struct UpdateVolumeCopysetConfigRequest {
2948    #[serde(rename = "targetCopysetCount")]
2949    pub target_copyset_count: i32,
2950}
2951
2952impl UpdateVolumeCopysetConfigRequest {
2953    /// Builds the value from its required fields. Optional fields start unset.
2954    pub fn new(target_copyset_count: i32) -> Self {
2955        Self {
2956            target_copyset_count,
2957        }
2958    }
2959}
2960
2961#[derive(Debug, Clone, Serialize, Deserialize)]
2962#[non_exhaustive]
2963pub struct StatsVolumeResponse {
2964    #[serde(rename = "volumeId")]
2965    pub volume_id: String,
2966    #[serde(rename = "liveVolume")]
2967    pub live_volume: i64,
2968    #[serde(rename = "totalVolume")]
2969    pub total_volume: i64,
2970    #[serde(rename = "pendingVolume")]
2971    pub pending_volume: i64,
2972    #[serde(rename = "liveInactiveVolume")]
2973    pub live_inactive_volume: i64,
2974}
2975
2976#[derive(Debug, Clone, Serialize, Deserialize)]
2977#[non_exhaustive]
2978pub struct SizeHistoryVolumeResponse {
2979    pub points: Vec<VolumeSizePoint>,
2980}
2981
2982#[derive(Debug, Clone, Default, Serialize)]
2983#[non_exhaustive]
2984pub struct CreateVolumeForkRequest {
2985    pub name: String,
2986    #[serde(rename = "parentName", skip_serializing_if = "Option::is_none")]
2987    pub parent_name: Option<String>,
2988    #[serde(rename = "asOf", skip_serializing_if = "Option::is_none")]
2989    pub as_of: Option<i64>,
2990    #[serde(rename = "volumeType", skip_serializing_if = "Option::is_none")]
2991    pub volume_type: Option<String>,
2992}
2993
2994impl CreateVolumeForkRequest {
2995    /// Builds the value from its required fields. Optional fields start unset.
2996    pub fn new(name: impl Into<String>) -> Self {
2997        Self {
2998            name: name.into(),
2999            parent_name: None,
3000            as_of: None,
3001            volume_type: None,
3002        }
3003    }
3004
3005    /// Sets `parent_name`.
3006    pub fn with_parent_name(mut self, value: impl Into<String>) -> Self {
3007        self.parent_name = Some(value.into());
3008        self
3009    }
3010
3011    /// Sets `as_of`.
3012    pub fn with_as_of(mut self, value: i64) -> Self {
3013        self.as_of = Some(value);
3014        self
3015    }
3016
3017    /// Sets `volume_type`.
3018    pub fn with_volume_type(mut self, value: impl Into<String>) -> Self {
3019        self.volume_type = Some(value.into());
3020        self
3021    }
3022}
3023
3024#[derive(Debug, Clone, Default, Serialize)]
3025#[non_exhaustive]
3026pub struct DeleteVolumeForkRequest {
3027    #[serde(skip_serializing_if = "Option::is_none")]
3028    pub force: Option<bool>,
3029    #[serde(rename = "volumeType", skip_serializing_if = "Option::is_none")]
3030    pub volume_type: Option<String>,
3031}
3032
3033impl DeleteVolumeForkRequest {
3034    /// Sets `force`.
3035    pub fn with_force(mut self, value: bool) -> Self {
3036        self.force = Some(value);
3037        self
3038    }
3039
3040    /// Sets `volume_type`.
3041    pub fn with_volume_type(mut self, value: impl Into<String>) -> Self {
3042        self.volume_type = Some(value.into());
3043        self
3044    }
3045}
3046
3047#[derive(Debug, Clone, Serialize, Deserialize)]
3048#[non_exhaustive]
3049pub struct DeleteForkVolumeResponse {
3050    #[serde(rename = "inactivatedFids")]
3051    pub inactivated_fids: Vec<i32>,
3052}
3053
3054#[derive(Debug, Clone, Default, Serialize)]
3055#[non_exhaustive]
3056pub struct RestoreVolumeForkRequest {
3057    #[serde(rename = "volumeType", skip_serializing_if = "Option::is_none")]
3058    pub volume_type: Option<String>,
3059}
3060
3061impl RestoreVolumeForkRequest {
3062    /// Sets `volume_type`.
3063    pub fn with_volume_type(mut self, value: impl Into<String>) -> Self {
3064        self.volume_type = Some(value.into());
3065        self
3066    }
3067}
3068
3069#[derive(Debug, Clone, Default)]
3070#[non_exhaustive]
3071pub struct VolumeListOptions {
3072    pub account_id: i64,
3073    pub region_id: Option<i64>,
3074    pub metadata_cluster_id: Option<i64>,
3075    pub storage_id: Option<i64>,
3076    pub volume_type: Option<String>,
3077    pub locked: Option<bool>,
3078    pub is_active: Option<bool>,
3079    pub page: Option<i64>,
3080    pub limit: Option<i64>,
3081}
3082
3083impl VolumeListOptions {
3084    /// Builds the value from its required fields. Optional fields start unset.
3085    pub fn new(account_id: i64) -> Self {
3086        Self {
3087            account_id,
3088            region_id: None,
3089            metadata_cluster_id: None,
3090            storage_id: None,
3091            volume_type: None,
3092            locked: None,
3093            is_active: None,
3094            page: None,
3095            limit: None,
3096        }
3097    }
3098
3099    /// Sets `region_id`.
3100    pub fn with_region_id(mut self, value: i64) -> Self {
3101        self.region_id = Some(value);
3102        self
3103    }
3104
3105    /// Sets `metadata_cluster_id`.
3106    pub fn with_metadata_cluster_id(mut self, value: i64) -> Self {
3107        self.metadata_cluster_id = Some(value);
3108        self
3109    }
3110
3111    /// Sets `storage_id`.
3112    pub fn with_storage_id(mut self, value: i64) -> Self {
3113        self.storage_id = Some(value);
3114        self
3115    }
3116
3117    /// Sets `volume_type`.
3118    pub fn with_volume_type(mut self, value: impl Into<String>) -> Self {
3119        self.volume_type = Some(value.into());
3120        self
3121    }
3122
3123    /// Sets `locked`.
3124    pub fn with_locked(mut self, value: bool) -> Self {
3125        self.locked = Some(value);
3126        self
3127    }
3128
3129    /// Sets `is_active`.
3130    pub fn with_is_active(mut self, value: bool) -> Self {
3131        self.is_active = Some(value);
3132        self
3133    }
3134
3135    /// Sets `page`.
3136    pub fn with_page(mut self, value: i64) -> Self {
3137        self.page = Some(value);
3138        self
3139    }
3140
3141    /// Sets `limit`.
3142    pub fn with_limit(mut self, value: i64) -> Self {
3143        self.limit = Some(value);
3144        self
3145    }
3146}
3147
3148// VolumeForkTrees
3149
3150#[derive(Debug, Clone, Default)]
3151#[non_exhaustive]
3152pub struct VolumeForkTreeListOptions {
3153    pub path: Option<String>,
3154    pub as_of: Option<i64>,
3155    pub cursor: Option<String>,
3156    pub limit: Option<i64>,
3157    pub sort: Option<String>,
3158    pub kind: Option<String>,
3159}
3160
3161impl VolumeForkTreeListOptions {
3162    /// Sets `path`.
3163    pub fn with_path(mut self, value: impl Into<String>) -> Self {
3164        self.path = Some(value.into());
3165        self
3166    }
3167
3168    /// Sets `as_of`.
3169    pub fn with_as_of(mut self, value: i64) -> Self {
3170        self.as_of = Some(value);
3171        self
3172    }
3173
3174    /// Sets `cursor`.
3175    pub fn with_cursor(mut self, value: impl Into<String>) -> Self {
3176        self.cursor = Some(value.into());
3177        self
3178    }
3179
3180    /// Sets `limit`.
3181    pub fn with_limit(mut self, value: i64) -> Self {
3182        self.limit = Some(value);
3183        self
3184    }
3185
3186    /// Sets `sort`.
3187    pub fn with_sort(mut self, value: impl Into<String>) -> Self {
3188        self.sort = Some(value.into());
3189        self
3190    }
3191
3192    /// Sets `kind`.
3193    pub fn with_kind(mut self, value: impl Into<String>) -> Self {
3194        self.kind = Some(value.into());
3195        self
3196    }
3197}
3198
3199// VolumeForkEntries
3200
3201#[derive(Debug, Clone, Default)]
3202#[non_exhaustive]
3203pub struct VolumeForkEntryListOptions {
3204    pub path: Option<String>,
3205    pub cursor: Option<i64>,
3206    pub limit: Option<i64>,
3207}
3208
3209impl VolumeForkEntryListOptions {
3210    /// Sets `path`.
3211    pub fn with_path(mut self, value: impl Into<String>) -> Self {
3212        self.path = Some(value.into());
3213        self
3214    }
3215
3216    /// Sets `cursor`.
3217    pub fn with_cursor(mut self, value: i64) -> Self {
3218        self.cursor = Some(value);
3219        self
3220    }
3221
3222    /// Sets `limit`.
3223    pub fn with_limit(mut self, value: i64) -> Self {
3224        self.limit = Some(value);
3225        self
3226    }
3227}
3228
3229// VolumeForkSearches
3230
3231#[derive(Debug, Clone, Default)]
3232#[non_exhaustive]
3233pub struct VolumeForkSearchListOptions {
3234    pub q: Option<String>,
3235    pub path: Option<String>,
3236    pub as_of: Option<i64>,
3237    pub exact: Option<bool>,
3238    pub cursor: Option<i64>,
3239    pub limit: Option<i64>,
3240    pub kind: Option<String>,
3241}
3242
3243impl VolumeForkSearchListOptions {
3244    /// Sets `q`.
3245    pub fn with_q(mut self, value: impl Into<String>) -> Self {
3246        self.q = Some(value.into());
3247        self
3248    }
3249
3250    /// Sets `path`.
3251    pub fn with_path(mut self, value: impl Into<String>) -> Self {
3252        self.path = Some(value.into());
3253        self
3254    }
3255
3256    /// Sets `as_of`.
3257    pub fn with_as_of(mut self, value: i64) -> Self {
3258        self.as_of = Some(value);
3259        self
3260    }
3261
3262    /// Sets `exact`.
3263    pub fn with_exact(mut self, value: bool) -> Self {
3264        self.exact = Some(value);
3265        self
3266    }
3267
3268    /// Sets `cursor`.
3269    pub fn with_cursor(mut self, value: i64) -> Self {
3270        self.cursor = Some(value);
3271        self
3272    }
3273
3274    /// Sets `limit`.
3275    pub fn with_limit(mut self, value: i64) -> Self {
3276        self.limit = Some(value);
3277        self
3278    }
3279
3280    /// Sets `kind`.
3281    pub fn with_kind(mut self, value: impl Into<String>) -> Self {
3282        self.kind = Some(value.into());
3283        self
3284    }
3285}
3286
3287// AuditLogs
3288
3289#[derive(Debug, Clone, Default)]
3290#[non_exhaustive]
3291pub struct AuditLogListOptions {
3292    pub account_id: i64,
3293    pub region_id: Option<i64>,
3294    pub metadata_cluster_id: Option<i64>,
3295    pub cursor: Option<i64>,
3296    pub limit: Option<i64>,
3297    pub subject: Option<String>,
3298    pub created_by: Option<String>,
3299}
3300
3301impl AuditLogListOptions {
3302    /// Builds the value from its required fields. Optional fields start unset.
3303    pub fn new(account_id: i64) -> Self {
3304        Self {
3305            account_id,
3306            region_id: None,
3307            metadata_cluster_id: None,
3308            cursor: None,
3309            limit: None,
3310            subject: None,
3311            created_by: None,
3312        }
3313    }
3314
3315    /// Sets `region_id`.
3316    pub fn with_region_id(mut self, value: i64) -> Self {
3317        self.region_id = Some(value);
3318        self
3319    }
3320
3321    /// Sets `metadata_cluster_id`.
3322    pub fn with_metadata_cluster_id(mut self, value: i64) -> Self {
3323        self.metadata_cluster_id = Some(value);
3324        self
3325    }
3326
3327    /// Sets `cursor`.
3328    pub fn with_cursor(mut self, value: i64) -> Self {
3329        self.cursor = Some(value);
3330        self
3331    }
3332
3333    /// Sets `limit`.
3334    pub fn with_limit(mut self, value: i64) -> Self {
3335        self.limit = Some(value);
3336        self
3337    }
3338
3339    /// Sets `subject`.
3340    pub fn with_subject(mut self, value: impl Into<String>) -> Self {
3341        self.subject = Some(value.into());
3342        self
3343    }
3344
3345    /// Sets `created_by`.
3346    pub fn with_created_by(mut self, value: impl Into<String>) -> Self {
3347        self.created_by = Some(value.into());
3348        self
3349    }
3350}
3351
3352// RegionAuditLogs
3353
3354#[derive(Debug, Clone, Default)]
3355#[non_exhaustive]
3356pub struct RegionAuditLogListOptions {
3357    pub metadata_cluster_id: Option<i64>,
3358    pub cursor: Option<i64>,
3359    pub limit: Option<i64>,
3360    pub subject: Option<String>,
3361    pub node: Option<String>,
3362}
3363
3364impl RegionAuditLogListOptions {
3365    /// Sets `metadata_cluster_id`.
3366    pub fn with_metadata_cluster_id(mut self, value: i64) -> Self {
3367        self.metadata_cluster_id = Some(value);
3368        self
3369    }
3370
3371    /// Sets `cursor`.
3372    pub fn with_cursor(mut self, value: i64) -> Self {
3373        self.cursor = Some(value);
3374        self
3375    }
3376
3377    /// Sets `limit`.
3378    pub fn with_limit(mut self, value: i64) -> Self {
3379        self.limit = Some(value);
3380        self
3381    }
3382
3383    /// Sets `subject`.
3384    pub fn with_subject(mut self, value: impl Into<String>) -> Self {
3385        self.subject = Some(value.into());
3386        self
3387    }
3388
3389    /// Sets `node`.
3390    pub fn with_node(mut self, value: impl Into<String>) -> Self {
3391        self.node = Some(value.into());
3392        self
3393    }
3394}
3395
3396// ServiceNodes
3397
3398#[derive(Debug, Clone, Serialize, Deserialize)]
3399#[non_exhaustive]
3400pub struct StatsHistoryServiceNodeResponse {
3401    #[serde(rename = "intervalMs")]
3402    pub interval_ms: i64,
3403    pub samples: Vec<NodeStatsSample>,
3404}
3405
3406// Nodes
3407
3408// ClientSessions
3409
3410#[derive(Debug, Clone, Default)]
3411#[non_exhaustive]
3412pub struct ClientSessionListOptions {
3413    pub account_id: i64,
3414    pub region_id: Option<i64>,
3415    pub metadata_cluster_id: Option<i64>,
3416    pub volume_id: Option<i64>,
3417    pub user_id: Option<i64>,
3418    pub client_type: Option<String>,
3419    pub status: Option<ClientSessionStatus>,
3420    pub is_active: Option<bool>,
3421    pub os_name: Option<String>,
3422    pub platform: Option<String>,
3423    pub search: Option<String>,
3424    pub page: Option<i64>,
3425    pub limit: Option<i64>,
3426}
3427
3428impl ClientSessionListOptions {
3429    /// Builds the value from its required fields. Optional fields start unset.
3430    pub fn new(account_id: i64) -> Self {
3431        Self {
3432            account_id,
3433            region_id: None,
3434            metadata_cluster_id: None,
3435            volume_id: None,
3436            user_id: None,
3437            client_type: None,
3438            status: None,
3439            is_active: None,
3440            os_name: None,
3441            platform: None,
3442            search: None,
3443            page: None,
3444            limit: None,
3445        }
3446    }
3447
3448    /// Sets `region_id`.
3449    pub fn with_region_id(mut self, value: i64) -> Self {
3450        self.region_id = Some(value);
3451        self
3452    }
3453
3454    /// Sets `metadata_cluster_id`.
3455    pub fn with_metadata_cluster_id(mut self, value: i64) -> Self {
3456        self.metadata_cluster_id = Some(value);
3457        self
3458    }
3459
3460    /// Sets `volume_id`.
3461    pub fn with_volume_id(mut self, value: i64) -> Self {
3462        self.volume_id = Some(value);
3463        self
3464    }
3465
3466    /// Sets `user_id`.
3467    pub fn with_user_id(mut self, value: i64) -> Self {
3468        self.user_id = Some(value);
3469        self
3470    }
3471
3472    /// Sets `client_type`.
3473    pub fn with_client_type(mut self, value: impl Into<String>) -> Self {
3474        self.client_type = Some(value.into());
3475        self
3476    }
3477
3478    /// Sets `status`.
3479    pub fn with_status(mut self, value: ClientSessionStatus) -> Self {
3480        self.status = Some(value);
3481        self
3482    }
3483
3484    /// Sets `is_active`.
3485    pub fn with_is_active(mut self, value: bool) -> Self {
3486        self.is_active = Some(value);
3487        self
3488    }
3489
3490    /// Sets `os_name`.
3491    pub fn with_os_name(mut self, value: impl Into<String>) -> Self {
3492        self.os_name = Some(value.into());
3493        self
3494    }
3495
3496    /// Sets `platform`.
3497    pub fn with_platform(mut self, value: impl Into<String>) -> Self {
3498        self.platform = Some(value.into());
3499        self
3500    }
3501
3502    /// Sets `search`.
3503    pub fn with_search(mut self, value: impl Into<String>) -> Self {
3504        self.search = Some(value.into());
3505        self
3506    }
3507
3508    /// Sets `page`.
3509    pub fn with_page(mut self, value: i64) -> Self {
3510        self.page = Some(value);
3511        self
3512    }
3513
3514    /// Sets `limit`.
3515    pub fn with_limit(mut self, value: i64) -> Self {
3516        self.limit = Some(value);
3517        self
3518    }
3519}
3520
3521// Discover
3522
3523// Metrics
3524
3525#[derive(Debug, Clone, Default, Serialize)]
3526#[non_exhaustive]
3527pub struct GenerateMetricTokenRequest {
3528    #[serde(rename = "expirySeconds")]
3529    pub expiry_seconds: i64,
3530}
3531
3532impl GenerateMetricTokenRequest {
3533    /// Builds the value from its required fields. Optional fields start unset.
3534    pub fn new(expiry_seconds: i64) -> Self {
3535        Self {
3536            expiry_seconds,
3537        }
3538    }
3539}
3540
3541// Dashboard
3542
3543// License
3544
3545#[derive(Debug, Clone, Default, Serialize)]
3546#[non_exhaustive]
3547pub struct LoadLicenseRequest {
3548    pub payloads: Vec<String>,
3549}
3550
3551impl LoadLicenseRequest {
3552    /// Builds the value from its required fields. Optional fields start unset.
3553    pub fn new(payloads: Vec<String>) -> Self {
3554        Self {
3555            payloads,
3556        }
3557    }
3558}
3559
3560// Alerts
3561
3562#[derive(Debug, Clone, Serialize, Deserialize)]
3563#[non_exhaustive]
3564pub struct ResolveAlertResponse {
3565    #[serde(rename = "alertId")]
3566    pub alert_id: String,
3567}
3568
3569#[derive(Debug, Clone, Default)]
3570#[non_exhaustive]
3571pub struct AlertListOptions {
3572    pub active: Option<bool>,
3573    pub account_id: Option<i64>,
3574    pub region_id: Option<i64>,
3575    pub severity: Option<i64>,
3576    pub category: Option<String>,
3577    pub since: Option<String>,
3578    pub page: Option<i64>,
3579    pub limit: Option<i64>,
3580}
3581
3582impl AlertListOptions {
3583    /// Sets `active`.
3584    pub fn with_active(mut self, value: bool) -> Self {
3585        self.active = Some(value);
3586        self
3587    }
3588
3589    /// Sets `account_id`.
3590    pub fn with_account_id(mut self, value: i64) -> Self {
3591        self.account_id = Some(value);
3592        self
3593    }
3594
3595    /// Sets `region_id`.
3596    pub fn with_region_id(mut self, value: i64) -> Self {
3597        self.region_id = Some(value);
3598        self
3599    }
3600
3601    /// Sets `severity`.
3602    pub fn with_severity(mut self, value: i64) -> Self {
3603        self.severity = Some(value);
3604        self
3605    }
3606
3607    /// Sets `category`.
3608    pub fn with_category(mut self, value: impl Into<String>) -> Self {
3609        self.category = Some(value.into());
3610        self
3611    }
3612
3613    /// Sets `since`.
3614    pub fn with_since(mut self, value: impl Into<String>) -> Self {
3615        self.since = Some(value.into());
3616        self
3617    }
3618
3619    /// Sets `page`.
3620    pub fn with_page(mut self, value: i64) -> Self {
3621        self.page = Some(value);
3622        self
3623    }
3624
3625    /// Sets `limit`.
3626    pub fn with_limit(mut self, value: i64) -> Self {
3627        self.limit = Some(value);
3628        self
3629    }
3630}
3631
3632// RegionAlerts
3633
3634#[derive(Debug, Clone, Serialize, Deserialize)]
3635#[non_exhaustive]
3636pub struct ResolveRegionAlertResponse {
3637    #[serde(rename = "alertId")]
3638    pub alert_id: String,
3639}
3640
3641#[derive(Debug, Clone, Default)]
3642#[non_exhaustive]
3643pub struct RegionAlertListOptions {
3644    pub active: Option<bool>,
3645    pub severity: Option<i64>,
3646    pub category: Option<String>,
3647    pub node_id: Option<String>,
3648    pub metadata_cluster_id: Option<i64>,
3649    pub since: Option<String>,
3650    pub page: Option<i64>,
3651    pub limit: Option<i64>,
3652}
3653
3654impl RegionAlertListOptions {
3655    /// Sets `active`.
3656    pub fn with_active(mut self, value: bool) -> Self {
3657        self.active = Some(value);
3658        self
3659    }
3660
3661    /// Sets `severity`.
3662    pub fn with_severity(mut self, value: i64) -> Self {
3663        self.severity = Some(value);
3664        self
3665    }
3666
3667    /// Sets `category`.
3668    pub fn with_category(mut self, value: impl Into<String>) -> Self {
3669        self.category = Some(value.into());
3670        self
3671    }
3672
3673    /// Sets `node_id`.
3674    pub fn with_node_id(mut self, value: impl Into<String>) -> Self {
3675        self.node_id = Some(value.into());
3676        self
3677    }
3678
3679    /// Sets `metadata_cluster_id`.
3680    pub fn with_metadata_cluster_id(mut self, value: i64) -> Self {
3681        self.metadata_cluster_id = Some(value);
3682        self
3683    }
3684
3685    /// Sets `since`.
3686    pub fn with_since(mut self, value: impl Into<String>) -> Self {
3687        self.since = Some(value.into());
3688        self
3689    }
3690
3691    /// Sets `page`.
3692    pub fn with_page(mut self, value: i64) -> Self {
3693        self.page = Some(value);
3694        self
3695    }
3696
3697    /// Sets `limit`.
3698    pub fn with_limit(mut self, value: i64) -> Self {
3699        self.limit = Some(value);
3700        self
3701    }
3702}
3703
3704// GCWorkerEvents
3705
3706#[derive(Debug, Clone, Default)]
3707#[non_exhaustive]
3708pub struct GCWorkerEventListOptions {
3709    pub node_id: Option<String>,
3710    pub goal: Option<String>,
3711    pub sid: Option<i64>,
3712    pub metadata_cluster_id: Option<i64>,
3713    pub since: Option<String>,
3714    pub page: Option<i64>,
3715    pub limit: Option<i64>,
3716}
3717
3718impl GCWorkerEventListOptions {
3719    /// Sets `node_id`.
3720    pub fn with_node_id(mut self, value: impl Into<String>) -> Self {
3721        self.node_id = Some(value.into());
3722        self
3723    }
3724
3725    /// Sets `goal`.
3726    pub fn with_goal(mut self, value: impl Into<String>) -> Self {
3727        self.goal = Some(value.into());
3728        self
3729    }
3730
3731    /// Sets `sid`.
3732    pub fn with_sid(mut self, value: i64) -> Self {
3733        self.sid = Some(value);
3734        self
3735    }
3736
3737    /// Sets `metadata_cluster_id`.
3738    pub fn with_metadata_cluster_id(mut self, value: i64) -> Self {
3739        self.metadata_cluster_id = Some(value);
3740        self
3741    }
3742
3743    /// Sets `since`.
3744    pub fn with_since(mut self, value: impl Into<String>) -> Self {
3745        self.since = Some(value.into());
3746        self
3747    }
3748
3749    /// Sets `page`.
3750    pub fn with_page(mut self, value: i64) -> Self {
3751        self.page = Some(value);
3752        self
3753    }
3754
3755    /// Sets `limit`.
3756    pub fn with_limit(mut self, value: i64) -> Self {
3757        self.limit = Some(value);
3758        self
3759    }
3760}
3761
3762// Vault