use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Default)]
#[non_exhaustive]
pub struct Config {
pub base_url: String,
pub private_key: String,
pub dashboard_user: Option<DashboardUser>,
pub dashboard_hmac_key: Option<String>,
}
impl Config {
pub fn new(base_url: impl Into<String>, private_key: impl Into<String>) -> Self {
Self {
base_url: base_url.into(),
private_key: private_key.into(),
dashboard_user: None,
dashboard_hmac_key: None,
}
}
pub fn with_dashboard_user(mut self, value: DashboardUser) -> Self {
self.dashboard_user = Some(value);
self
}
pub fn with_dashboard_hmac_key(mut self, value: impl Into<String>) -> Self {
self.dashboard_hmac_key = Some(value.into());
self
}
}
#[derive(Debug, Clone, Default)]
#[non_exhaustive]
pub struct ListOptions {
pub page: Option<i64>,
pub limit: Option<i64>,
}
impl ListOptions {
pub fn with_page(mut self, value: i64) -> Self {
self.page = Some(value);
self
}
pub fn with_limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
}
#[derive(Debug, Clone, Deserialize)]
#[non_exhaustive]
pub struct PaginationMeta {
pub page: i64,
pub limit: i64,
pub total: i64,
#[serde(rename = "totalPages")]
pub total_pages: i64,
}
#[derive(Debug, Clone, Deserialize)]
#[non_exhaustive]
pub struct PaginatedResponse<T> {
pub items: Vec<T>,
pub pagination: PaginationMeta,
}
#[derive(Debug, Clone, Deserialize)]
#[non_exhaustive]
pub struct CursorPaginatedResponse<T> {
pub items: Vec<T>,
#[serde(rename = "nextCursor")]
pub next_cursor: Option<i64>,
}
#[derive(Debug, Clone, Deserialize)]
#[non_exhaustive]
pub struct StringCursorPaginatedResponse<T> {
pub items: Vec<T>,
#[serde(rename = "nextCursor")]
pub next_cursor: Option<String>,
}
#[derive(Debug, Clone, Deserialize)]
#[non_exhaustive]
pub struct IdResponse {
pub id: i64,
}
#[derive(Debug, Clone, PartialEq, Eq)]
#[non_exhaustive]
pub enum ClientSessionStatus {
Connected,
Active,
Degraded,
Disconnected,
Expired,
Unknown,
UnknownValue(String),
}
impl ClientSessionStatus {
pub fn as_str(&self) -> &str {
match self {
ClientSessionStatus::Connected => "connected",
ClientSessionStatus::Active => "active",
ClientSessionStatus::Degraded => "degraded",
ClientSessionStatus::Disconnected => "disconnected",
ClientSessionStatus::Expired => "expired",
ClientSessionStatus::Unknown => "unknown",
ClientSessionStatus::UnknownValue(s) => s.as_str(),
}
}
pub fn is_known(&self) -> bool {
!matches!(self, ClientSessionStatus::UnknownValue(_))
}
}
impl std::fmt::Display for ClientSessionStatus {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str(self.as_str())
}
}
impl From<&str> for ClientSessionStatus {
fn from(s: &str) -> Self {
match s {
"connected" => ClientSessionStatus::Connected,
"active" => ClientSessionStatus::Active,
"degraded" => ClientSessionStatus::Degraded,
"disconnected" => ClientSessionStatus::Disconnected,
"expired" => ClientSessionStatus::Expired,
"unknown" => ClientSessionStatus::Unknown,
other => ClientSessionStatus::UnknownValue(other.to_string()),
}
}
}
impl Serialize for ClientSessionStatus {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de> Deserialize<'de> for ClientSessionStatus {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = String::deserialize(deserializer)?;
Ok(ClientSessionStatus::from(s.as_str()))
}
}
#[derive(Debug, Clone, PartialEq, Eq)]
#[non_exhaustive]
pub enum CopysetState {
Active,
Draining,
SyncedDrained,
Retired,
Unknown(String),
}
impl CopysetState {
pub fn as_str(&self) -> &str {
match self {
CopysetState::Active => "active",
CopysetState::Draining => "draining",
CopysetState::SyncedDrained => "synced_drained",
CopysetState::Retired => "retired",
CopysetState::Unknown(s) => s.as_str(),
}
}
pub fn is_known(&self) -> bool {
!matches!(self, CopysetState::Unknown(_))
}
}
impl std::fmt::Display for CopysetState {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str(self.as_str())
}
}
impl From<&str> for CopysetState {
fn from(s: &str) -> Self {
match s {
"active" => CopysetState::Active,
"draining" => CopysetState::Draining,
"synced_drained" => CopysetState::SyncedDrained,
"retired" => CopysetState::Retired,
other => CopysetState::Unknown(other.to_string()),
}
}
}
impl Serialize for CopysetState {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de> Deserialize<'de> for CopysetState {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = String::deserialize(deserializer)?;
Ok(CopysetState::from(s.as_str()))
}
}
#[derive(Debug, Clone, PartialEq, Eq)]
#[non_exhaustive]
pub enum LicenseQuotaState {
Ok,
Exceeded,
Unknown(String),
}
impl LicenseQuotaState {
pub fn as_str(&self) -> &str {
match self {
LicenseQuotaState::Ok => "ok",
LicenseQuotaState::Exceeded => "exceeded",
LicenseQuotaState::Unknown(s) => s.as_str(),
}
}
pub fn is_known(&self) -> bool {
!matches!(self, LicenseQuotaState::Unknown(_))
}
}
impl std::fmt::Display for LicenseQuotaState {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str(self.as_str())
}
}
impl From<&str> for LicenseQuotaState {
fn from(s: &str) -> Self {
match s {
"ok" => LicenseQuotaState::Ok,
"exceeded" => LicenseQuotaState::Exceeded,
other => LicenseQuotaState::Unknown(other.to_string()),
}
}
}
impl Serialize for LicenseQuotaState {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de> Deserialize<'de> for LicenseQuotaState {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = String::deserialize(deserializer)?;
Ok(LicenseQuotaState::from(s.as_str()))
}
}
#[derive(Debug, Clone, PartialEq, Eq)]
#[non_exhaustive]
pub enum LicenseStatus {
Valid,
Expiring,
Grace,
ExpiredAccess,
Expired,
Unknown(String),
}
impl LicenseStatus {
pub fn as_str(&self) -> &str {
match self {
LicenseStatus::Valid => "valid",
LicenseStatus::Expiring => "expiring",
LicenseStatus::Grace => "grace",
LicenseStatus::ExpiredAccess => "expired_access",
LicenseStatus::Expired => "expired",
LicenseStatus::Unknown(s) => s.as_str(),
}
}
pub fn is_known(&self) -> bool {
!matches!(self, LicenseStatus::Unknown(_))
}
}
impl std::fmt::Display for LicenseStatus {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str(self.as_str())
}
}
impl From<&str> for LicenseStatus {
fn from(s: &str) -> Self {
match s {
"valid" => LicenseStatus::Valid,
"expiring" => LicenseStatus::Expiring,
"grace" => LicenseStatus::Grace,
"expired_access" => LicenseStatus::ExpiredAccess,
"expired" => LicenseStatus::Expired,
other => LicenseStatus::Unknown(other.to_string()),
}
}
}
impl Serialize for LicenseStatus {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de> Deserialize<'de> for LicenseStatus {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = String::deserialize(deserializer)?;
Ok(LicenseStatus::from(s.as_str()))
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct Account {
pub id: i64,
pub name: String,
pub description: String,
#[serde(rename = "iconUrl", skip_serializing_if = "Option::is_none")]
pub icon_url: Option<String>,
#[serde(rename = "providerInfo", skip_serializing_if = "Option::is_none")]
pub provider_info: Option<serde_json::Value>,
#[serde(rename = "liveVolume")]
pub live_volume: i64,
#[serde(rename = "totalVolume")]
pub total_volume: i64,
#[serde(rename = "quotaLimit")]
pub quota_limit: i64,
#[serde(rename = "quotaExcessPct")]
pub quota_excess_pct: i32,
#[serde(rename = "isActive")]
pub is_active: bool,
pub locked: bool,
#[serde(skip_serializing_if = "Option::is_none")]
pub retention: Option<RetentionPolicy>,
#[serde(rename = "createdAt")]
pub created_at: String,
#[serde(rename = "updatedAt")]
pub updated_at: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct User {
pub id: i64,
#[serde(rename = "accountId")]
pub account_id: i64,
pub username: String,
pub email: String,
pub name: String,
#[serde(rename = "isActive")]
pub is_active: bool,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct Region {
pub id: i64,
#[serde(rename = "exportId")]
pub export_id: String,
#[serde(rename = "accountId")]
pub account_id: i64,
pub name: String,
#[serde(rename = "liveVolume")]
pub live_volume: i64,
#[serde(rename = "totalVolume")]
pub total_volume: i64,
#[serde(rename = "isActive")]
pub is_active: bool,
#[serde(rename = "createdAt")]
pub created_at: String,
#[serde(rename = "updatedAt")]
pub updated_at: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct MetadataCluster {
pub id: i64,
#[serde(rename = "exportId")]
pub export_id: String,
#[serde(rename = "regionId")]
pub region_id: i64,
pub name: String,
#[serde(rename = "defaultCluster")]
pub default_cluster: bool,
#[serde(rename = "isReady")]
pub is_ready: bool,
#[serde(rename = "isActive")]
pub is_active: bool,
#[serde(rename = "createdAt")]
pub created_at: String,
#[serde(rename = "updatedAt")]
pub updated_at: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct Storage {
pub id: i64,
pub uuid: String,
pub account: Ref,
#[serde(rename = "regionInfo")]
pub region_info: Ref,
pub name: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "storageType")]
pub storage_type: String,
#[serde(rename = "providerType")]
pub provider_type: String,
pub endpoint: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub region: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub bucket: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub base: Option<String>,
#[serde(rename = "physicalFingerprint", skip_serializing_if = "Option::is_none")]
pub physical_fingerprint: Option<String>,
#[serde(rename = "blockRegion", skip_serializing_if = "Option::is_none")]
pub block_region: Option<String>,
#[serde(rename = "blockSize", skip_serializing_if = "Option::is_none")]
pub block_size: Option<i32>,
#[serde(rename = "directAccess", skip_serializing_if = "Option::is_none")]
pub direct_access: Option<bool>,
#[serde(rename = "isActive")]
pub is_active: bool,
#[serde(rename = "createdAt")]
pub created_at: String,
#[serde(rename = "updatedAt")]
pub updated_at: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct BlockVolume {
pub id: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "shardId")]
pub shard_id: i64,
#[serde(rename = "isActive")]
pub is_active: bool,
#[serde(rename = "createdAt")]
pub created_at: String,
#[serde(rename = "updatedAt")]
pub updated_at: String,
#[serde(rename = "memberState", skip_serializing_if = "Option::is_none")]
pub member_state: Option<String>,
#[serde(rename = "copysetId", skip_serializing_if = "Option::is_none")]
pub copyset_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct Copyset {
pub id: String,
#[serde(rename = "storageId")]
pub storage_id: String,
pub name: String,
pub state: CopysetState,
#[serde(rename = "memberA", skip_serializing_if = "Option::is_none")]
pub member_a: Option<String>,
#[serde(rename = "memberB", skip_serializing_if = "Option::is_none")]
pub member_b: Option<String>,
#[serde(rename = "drainStartedAt", skip_serializing_if = "Option::is_none")]
pub drain_started_at: Option<String>,
#[serde(rename = "syncedAt", skip_serializing_if = "Option::is_none")]
pub synced_at: Option<String>,
#[serde(rename = "retiredAt", skip_serializing_if = "Option::is_none")]
pub retired_at: Option<String>,
#[serde(rename = "pendingSyncJobsA", skip_serializing_if = "Option::is_none")]
pub pending_sync_jobs_a: Option<i32>,
#[serde(rename = "pendingSyncJobsB", skip_serializing_if = "Option::is_none")]
pub pending_sync_jobs_b: Option<i32>,
#[serde(rename = "pendingSyncJobsObservedAt", skip_serializing_if = "Option::is_none")]
pub pending_sync_jobs_observed_at: Option<String>,
#[serde(rename = "volumeCount")]
pub volume_count: i64,
#[serde(rename = "drainInitiatedBy", skip_serializing_if = "Option::is_none")]
pub drain_initiated_by: Option<i64>,
pub tags: Vec<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct PoolMember {
pub id: String,
pub name: String,
#[serde(rename = "regionId")]
pub region_id: i64,
#[serde(rename = "memberState")]
pub member_state: String,
#[serde(rename = "failureDomain", skip_serializing_if = "Option::is_none")]
pub failure_domain: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct Volume {
pub id: i64,
pub account: Ref,
pub storage: Ref,
pub region: Ref,
#[serde(rename = "metadataCluster", skip_serializing_if = "Option::is_none")]
pub metadata_cluster: Option<Ref>,
pub name: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "volumeType")]
pub volume_type: String,
#[serde(rename = "storageType", skip_serializing_if = "Option::is_none")]
pub storage_type: Option<String>,
pub encryption: bool,
#[serde(rename = "quotaLimit")]
pub quota_limit: i64,
#[serde(rename = "liveVolume")]
pub live_volume: i64,
#[serde(rename = "totalVolume")]
pub total_volume: i64,
#[serde(rename = "pendingVolume")]
pub pending_volume: i64,
#[serde(rename = "liveInactiveVolume")]
pub live_inactive_volume: i64,
pub locked: bool,
pub retention: VolumeRetentionPolicy,
pub versioning: VolumeVersioningPolicy,
pub compaction: String,
#[serde(rename = "isActive")]
pub is_active: bool,
#[serde(rename = "isCleanupMetaEnabled")]
pub is_cleanup_meta_enabled: bool,
#[serde(rename = "isCleanupStorageEnabled")]
pub is_cleanup_storage_enabled: bool,
#[serde(rename = "isCleanupVaultEnabled")]
pub is_cleanup_vault_enabled: bool,
#[serde(rename = "createdAt")]
pub created_at: String,
#[serde(rename = "updatedAt")]
pub updated_at: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct VolumeBlockPlacementConfig {
pub id: i64,
#[serde(rename = "targetCopysetCount")]
pub target_copyset_count: i32,
#[serde(rename = "currentEpoch")]
pub current_epoch: i64,
#[serde(rename = "copysetIds")]
pub copyset_ids: Vec<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct VolumeBlockPlacementResizeResult {
pub id: i64,
#[serde(rename = "targetCopysetCount")]
pub target_copyset_count: i32,
#[serde(rename = "copysetCountBefore")]
pub copyset_count_before: i32,
#[serde(rename = "copysetsAdded")]
pub copysets_added: i32,
#[serde(rename = "copysetsRemoved")]
pub copysets_removed: i32,
#[serde(rename = "copysetCountAfter")]
pub copyset_count_after: i32,
pub epoch: i64,
pub partial: bool,
#[serde(skip_serializing_if = "Option::is_none")]
pub reason: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct Fork {
pub fid: i32,
pub name: String,
#[serde(rename = "parentFid")]
pub parent_fid: i32,
#[serde(rename = "parentName")]
pub parent_name: String,
#[serde(rename = "snapshotTs")]
pub snapshot_ts: i64,
#[serde(rename = "createdBy", skip_serializing_if = "Option::is_none")]
pub created_by: Option<i64>,
#[serde(rename = "createdAt")]
pub created_at: i64,
#[serde(rename = "childrenCount")]
pub children_count: i32,
#[serde(skip_serializing_if = "Option::is_none")]
pub inactive: Option<bool>,
#[serde(rename = "inactiveAt", skip_serializing_if = "Option::is_none")]
pub inactive_at: Option<i64>,
pub status: String,
pub size: i64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct ExclusiveGrantsResponse {
#[serde(rename = "volumeId")]
pub volume_id: i64,
pub grants: Vec<ExclusiveGrant>,
#[serde(rename = "ownerReachable")]
pub owner_reachable: bool,
pub truncated: bool,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct ForkTreeEntry {
pub inode: i64,
pub name: String,
pub kind: String,
pub size: i64,
pub mtime: i64,
pub ctime: i64,
#[serde(rename = "creatorId", skip_serializing_if = "Option::is_none")]
pub creator_id: Option<i64>,
#[serde(rename = "updaterId", skip_serializing_if = "Option::is_none")]
pub updater_id: Option<i64>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct ForkEntryDetail {
pub inode: i64,
pub path: String,
pub name: String,
pub kind: String,
pub size: i64,
pub mtime: i64,
pub ctime: i64,
pub generation: i64,
#[serde(skip_serializing_if = "Option::is_none")]
pub owner: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub mode: Option<i32>,
#[serde(skip_serializing_if = "Option::is_none")]
pub xattrs: Option<serde_json::Value>,
#[serde(rename = "creatorId", skip_serializing_if = "Option::is_none")]
pub creator_id: Option<i64>,
#[serde(rename = "updaterId", skip_serializing_if = "Option::is_none")]
pub updater_id: Option<i64>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct ForkEntryVersion {
pub generation: i64,
pub size: i64,
pub mtime: i64,
#[serde(rename = "updaterId", skip_serializing_if = "Option::is_none")]
pub updater_id: Option<i64>,
#[serde(rename = "contentHash", skip_serializing_if = "Option::is_none")]
pub content_hash: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct ForkTreeMatch {
pub path: String,
pub inode: i64,
pub kind: String,
pub size: i64,
pub mtime: i64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct AuditLog {
pub id: i64,
pub title: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub subject: Option<String>,
pub success: bool,
#[serde(skip_serializing_if = "Option::is_none")]
pub data: Option<serde_json::Value>,
#[serde(rename = "createdBy", skip_serializing_if = "Option::is_none")]
pub created_by: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub node: Option<String>,
#[serde(rename = "accountId", skip_serializing_if = "Option::is_none")]
pub account_id: Option<i64>,
#[serde(rename = "regionId", skip_serializing_if = "Option::is_none")]
pub region_id: Option<i64>,
#[serde(rename = "metadataClusterId", skip_serializing_if = "Option::is_none")]
pub metadata_cluster_id: Option<i64>,
#[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
#[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")]
pub updated_at: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct ServiceNode {
pub id: i64,
#[serde(rename = "regionId")]
pub region_id: i64,
#[serde(rename = "metadataClusterId", skip_serializing_if = "Option::is_none")]
pub metadata_cluster_id: Option<i64>,
#[serde(rename = "serviceType")]
pub service_type: String,
#[serde(rename = "nodeId")]
pub node_id: String,
#[serde(rename = "advertiseAddr")]
pub advertise_addr: String,
#[serde(rename = "rpcAddr", skip_serializing_if = "Option::is_none")]
pub rpc_addr: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub addrs: Option<Vec<NodeAddress>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub metadata: Option<serde_json::Value>,
#[serde(rename = "metricsEndpoint", skip_serializing_if = "Option::is_none")]
pub metrics_endpoint: Option<String>,
#[serde(rename = "instanceId", skip_serializing_if = "Option::is_none")]
pub instance_id: Option<String>,
#[serde(rename = "instanceInfo", skip_serializing_if = "Option::is_none")]
pub instance_info: Option<serde_json::Value>,
pub status: String,
#[serde(rename = "lastHeartbeat", skip_serializing_if = "Option::is_none")]
pub last_heartbeat: Option<i64>,
#[serde(rename = "isActive")]
pub is_active: bool,
#[serde(rename = "memUsage", skip_serializing_if = "Option::is_none")]
pub mem_usage: Option<f64>,
#[serde(rename = "sysLoad", skip_serializing_if = "Option::is_none")]
pub sys_load: Option<i64>,
#[serde(rename = "binaryVersion", skip_serializing_if = "Option::is_none")]
pub binary_version: Option<i32>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct ClientSession {
pub id: i64,
pub account: Ref,
pub region: Ref,
#[serde(rename = "metadataCluster", skip_serializing_if = "Option::is_none")]
pub metadata_cluster: Option<Ref>,
pub volume: VolumeRef,
#[serde(skip_serializing_if = "Option::is_none")]
pub user: Option<Ref>,
#[serde(rename = "clientType")]
pub client_type: String,
#[serde(rename = "osName")]
pub os_name: String,
#[serde(rename = "osVersion", skip_serializing_if = "Option::is_none")]
pub os_version: Option<String>,
#[serde(rename = "appVersion", skip_serializing_if = "Option::is_none")]
pub app_version: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub hostname: Option<String>,
#[serde(rename = "ipAddr")]
pub ip_addr: String,
#[serde(rename = "mountMode", skip_serializing_if = "Option::is_none")]
pub mount_mode: Option<String>,
#[serde(rename = "mountPath", skip_serializing_if = "Option::is_none")]
pub mount_path: Option<String>,
#[serde(rename = "forkName", skip_serializing_if = "Option::is_none")]
pub fork_name: Option<String>,
#[serde(rename = "isTemporaryFork")]
pub is_temporary_fork: bool,
#[serde(skip_serializing_if = "Option::is_none")]
pub metadata: Option<serde_json::Value>,
#[serde(skip_serializing_if = "Option::is_none")]
pub metrics: Option<serde_json::Value>,
pub status: ClientSessionStatus,
#[serde(rename = "lastHeartbeat", skip_serializing_if = "Option::is_none")]
pub last_heartbeat: Option<i64>,
#[serde(rename = "connectedAt", skip_serializing_if = "Option::is_none")]
pub connected_at: Option<i64>,
#[serde(rename = "disconnectedAt", skip_serializing_if = "Option::is_none")]
pub disconnected_at: Option<i64>,
#[serde(rename = "isActive")]
pub is_active: bool,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct SessionSummary {
#[serde(rename = "byStatus")]
pub by_status: Vec<SessionSummaryStatusEntry>,
#[serde(rename = "byPlatform")]
pub by_platform: Vec<SessionSummaryFacet>,
#[serde(rename = "byOsName")]
pub by_os_name: Vec<SessionSummaryFacet>,
#[serde(rename = "regionCount")]
pub region_count: i64,
#[serde(rename = "volumeCount")]
pub volume_count: i64,
#[serde(rename = "hostCount")]
pub host_count: i64,
#[serde(rename = "degradedCount")]
pub degraded_count: i64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct MountReportResponse {
#[serde(skip_serializing_if = "Option::is_none")]
pub mount: Option<MountDetails>,
#[serde(rename = "lastHeartbeat", skip_serializing_if = "Option::is_none")]
pub last_heartbeat: Option<i64>,
#[serde(rename = "ageSeconds", skip_serializing_if = "Option::is_none")]
pub age_seconds: Option<i64>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct SupportBundle {
pub session: ClientSession,
#[serde(rename = "mountReport")]
pub mount_report: MountReportResponse,
#[serde(rename = "serverTime")]
pub server_time: i64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct DiscoverMetaResponse {
#[serde(rename = "regionId")]
pub region_id: i64,
pub region: String,
pub endpoints: Vec<DiscoverEndpoint>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct MetricsTarget {
pub targets: Vec<String>,
pub labels: serde_json::Value,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct MetricsTokenResponse {
pub token: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct DashboardStats {
#[serde(rename = "userCount")]
pub user_count: i64,
#[serde(rename = "volumeCount")]
pub volume_count: i64,
#[serde(rename = "regionCount")]
pub region_count: i64,
#[serde(rename = "storageCount")]
pub storage_count: i64,
#[serde(rename = "totalVolumeUsed")]
pub total_volume_used: i64,
#[serde(rename = "totalQuotaLimit")]
pub total_quota_limit: i64,
#[serde(rename = "activeSessionCount")]
pub active_session_count: i64,
#[serde(rename = "regionBreakdown")]
pub region_breakdown: Vec<RegionVolumeMetrics>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct LicenseDetails {
#[serde(rename = "licenseId")]
pub license_id: String,
pub licensee: String,
pub contact: String,
#[serde(rename = "licenseType")]
pub license_type: String,
#[serde(rename = "issuedAt")]
pub issued_at: String,
#[serde(rename = "expiresAt")]
pub expires_at: String,
#[serde(rename = "gracePeriodDays")]
pub grace_period_days: i64,
#[serde(rename = "expiredAccessDays")]
pub expired_access_days: i64,
#[serde(rename = "maxNodes")]
pub max_nodes: i64,
#[serde(rename = "maxVolumes")]
pub max_volumes: i64,
#[serde(rename = "maxUsers")]
pub max_users: i64,
#[serde(rename = "maxAccounts")]
pub max_accounts: i64,
#[serde(rename = "maxRegions")]
pub max_regions: i64,
#[serde(rename = "maxStorageBytes")]
pub max_storage_bytes: i64,
pub status: LicenseStatus,
#[serde(rename = "daysRemaining")]
pub days_remaining: i64,
#[serde(rename = "graceEndsAt")]
pub grace_ends_at: String,
#[serde(rename = "graceDaysLeft")]
pub grace_days_left: i64,
#[serde(rename = "expiredAccessEndsAt")]
pub expired_access_ends_at: String,
#[serde(rename = "expiredAccessDaysLeft")]
pub expired_access_days_left: i64,
pub quota: LicenseQuota,
#[serde(skip_serializing_if = "Option::is_none")]
pub distribution: Option<String>,
#[serde(rename = "distributionRef", skip_serializing_if = "Option::is_none")]
pub distribution_ref: Option<Vec<String>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub deployment: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub domains: Option<Vec<String>>,
#[serde(rename = "unlimitedStorage", skip_serializing_if = "Option::is_none")]
pub unlimited_storage: Option<bool>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct LicenseTerms {
pub terms: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct LicenseLoadResult {
pub loaded: i64,
pub ignored: i64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct LicenseList {
pub items: Vec<LicenseRecord>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct ServiceAlert {
pub id: i64,
#[serde(rename = "alertId")]
pub alert_id: String,
pub source: String,
#[serde(rename = "nodeId")]
pub node_id: String,
pub severity: i64,
pub category: String,
pub title: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub region: Option<Ref>,
#[serde(skip_serializing_if = "Option::is_none")]
pub account: Option<Ref>,
#[serde(rename = "eventTime")]
pub event_time: String,
#[serde(rename = "resolvedAt", skip_serializing_if = "Option::is_none")]
pub resolved_at: Option<String>,
#[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct AlertCountResponse {
pub active: i64,
pub recent: i64,
#[serde(rename = "infoCount")]
pub info_count: i64,
#[serde(rename = "warningCount")]
pub warning_count: i64,
#[serde(rename = "criticalCount")]
pub critical_count: i64,
#[serde(rename = "asOf")]
pub as_of: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct RegionAlert {
pub id: i64,
#[serde(rename = "alertId")]
pub alert_id: String,
pub source: String,
#[serde(rename = "nodeId")]
pub node_id: String,
#[serde(rename = "metadataClusterId", skip_serializing_if = "Option::is_none")]
pub metadata_cluster_id: Option<i64>,
pub severity: i64,
pub category: String,
pub title: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "eventTime")]
pub event_time: String,
#[serde(rename = "resolvedAt", skip_serializing_if = "Option::is_none")]
pub resolved_at: Option<String>,
#[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct GCWorkerEvent {
pub id: i64,
#[serde(rename = "nodeId")]
pub node_id: String,
#[serde(rename = "metadataClusterId", skip_serializing_if = "Option::is_none")]
pub metadata_cluster_id: Option<i64>,
pub goal: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub sid: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub subject: Option<String>,
pub ops: serde_json::Value,
#[serde(rename = "durationMs")]
pub duration_ms: i64,
#[serde(rename = "eventTime")]
pub event_time: String,
#[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct GCWorkerEventHistogramResponse {
pub buckets: Vec<GCWorkerEventBucket>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct GCWorkerEventGoalsResponse {
pub goals: Vec<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct BackfillFailure {
#[serde(rename = "shardId")]
pub shard_id: i64,
pub error: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct CompatibleStorage {
pub id: i64,
pub uuid: String,
pub name: String,
#[serde(rename = "storageType")]
pub storage_type: String,
#[serde(rename = "providerType")]
pub provider_type: String,
pub volumes: Vec<CompatibleVolume>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct CompatibleVolume {
pub id: String,
pub name: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[non_exhaustive]
pub struct DashboardUser {
pub id: String,
pub name: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
pub role: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub username: Option<String>,
#[serde(rename = "accountId", skip_serializing_if = "Option::is_none")]
pub account_id: Option<i64>,
#[serde(rename = "userId", skip_serializing_if = "Option::is_none")]
pub user_id: Option<i64>,
#[serde(rename = "volumeId", skip_serializing_if = "Option::is_none")]
pub volume_id: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub exp: Option<i64>,
}
impl DashboardUser {
pub fn new(id: impl Into<String>, name: impl Into<String>, role: impl Into<String>) -> Self {
Self {
id: id.into(),
name: name.into(),
role: role.into(),
email: None,
username: None,
account_id: None,
user_id: None,
volume_id: None,
exp: None,
}
}
pub fn with_email(mut self, value: impl Into<String>) -> Self {
self.email = Some(value.into());
self
}
pub fn with_username(mut self, value: impl Into<String>) -> Self {
self.username = Some(value.into());
self
}
pub fn with_account_id(mut self, value: i64) -> Self {
self.account_id = Some(value);
self
}
pub fn with_user_id(mut self, value: i64) -> Self {
self.user_id = Some(value);
self
}
pub fn with_volume_id(mut self, value: i64) -> Self {
self.volume_id = Some(value);
self
}
pub fn with_exp(mut self, value: i64) -> Self {
self.exp = Some(value);
self
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct DiscoverEndpoint {
#[serde(rename = "nodeId")]
pub node_id: String,
pub status: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub public: Option<Vec<DiscoverEndpointAddr>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub private: Option<Vec<DiscoverEndpointAddr>>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct DiscoverEndpointAddr {
pub tcp: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub udp: Option<String>,
pub family: i64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct ExclusiveGrant {
#[serde(rename = "sessionId")]
pub session_id: String,
#[serde(rename = "sessionName")]
pub session_name: String,
pub fork: String,
#[serde(rename = "holderIp")]
pub holder_ip: String,
pub path: String,
#[serde(rename = "scopeInode")]
pub scope_inode: String,
pub kind: String,
pub state: String,
pub role: String,
pub durability: String,
#[serde(rename = "takeOverText")]
pub take_over_text: String,
#[serde(rename = "sinceUnixMs")]
pub since_unix_ms: i64,
#[serde(rename = "holderEpoch")]
pub holder_epoch: u64,
#[serde(rename = "windowSeconds")]
pub window_seconds: i32,
#[serde(rename = "standbyPosition")]
pub standby_position: i32,
#[serde(skip_serializing_if = "Option::is_none")]
pub live: Option<bool>,
#[serde(rename = "lastRenewAgeMs", skip_serializing_if = "Option::is_none")]
pub last_renew_age_ms: Option<i64>,
#[serde(rename = "lastSeenAgeMs", skip_serializing_if = "Option::is_none")]
pub last_seen_age_ms: Option<i64>,
#[serde(rename = "fencedSinceUnixMs", skip_serializing_if = "Option::is_none")]
pub fenced_since_unix_ms: Option<i64>,
#[serde(rename = "failoverGraceMs", skip_serializing_if = "Option::is_none")]
pub failover_grace_ms: Option<i64>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct GCWorkerEventBucket {
#[serde(rename = "bucketStart")]
pub bucket_start: String,
pub goal: String,
pub count: i64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct LicenseQuota {
pub state: LicenseQuotaState,
#[serde(rename = "liveVolume")]
pub live_volume: i64,
#[serde(rename = "totalVolume")]
pub total_volume: i64,
pub generation: i64,
#[serde(rename = "lastTransitionAtMs")]
pub last_transition_at_ms: i64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct LicenseRecord {
pub key: String,
pub licensee: String,
pub status: LicenseStatus,
#[serde(rename = "issuedAt")]
pub issued_at: String,
#[serde(rename = "expiresAt")]
pub expires_at: String,
#[serde(rename = "maxStorageBytes")]
pub max_storage_bytes: i64,
#[serde(rename = "insertedAt")]
pub inserted_at: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct MountDetails {
#[serde(skip_serializing_if = "Option::is_none")]
pub command: Option<String>,
#[serde(rename = "mountPoint", skip_serializing_if = "Option::is_none")]
pub mount_point: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub args: Option<Vec<String>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub truncated: Option<bool>,
#[serde(rename = "mountOptions", skip_serializing_if = "Option::is_none")]
pub mount_options: Option<Vec<String>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub flags: Option<Vec<MountFlag>>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct MountFlag {
pub name: String,
pub value: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub source: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct MoveVolumeFailure {
#[serde(rename = "volumeId")]
pub volume_id: String,
pub error: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct NodeAddress {
pub family: i64,
pub scope: String,
pub advertise: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub rpc: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct NodeStatsSample {
#[serde(rename = "timestampMs")]
pub timestamp_ms: i64,
#[serde(rename = "intervalMs")]
pub interval_ms: i64,
#[serde(rename = "loadAvg1")]
pub load_avg1: f64,
#[serde(rename = "loadAvg5")]
pub load_avg5: f64,
#[serde(rename = "loadAvg15")]
pub load_avg15: f64,
#[serde(rename = "memUsage")]
pub mem_usage: f64,
#[serde(rename = "readIops")]
pub read_iops: f64,
#[serde(rename = "writeIops")]
pub write_iops: f64,
#[serde(rename = "netRxBytesPerSec")]
pub net_rx_bytes_per_sec: f64,
#[serde(rename = "netTxBytesPerSec")]
pub net_tx_bytes_per_sec: f64,
#[serde(rename = "processCount")]
pub process_count: i64,
#[serde(rename = "diskUsedBytes", skip_serializing_if = "Option::is_none")]
pub disk_used_bytes: Option<i64>,
#[serde(rename = "diskTotalBytes", skip_serializing_if = "Option::is_none")]
pub disk_total_bytes: Option<i64>,
#[serde(rename = "dbLatency1mUs", skip_serializing_if = "Option::is_none")]
pub db_latency1m_us: Option<f64>,
#[serde(rename = "dbLatency5mUs", skip_serializing_if = "Option::is_none")]
pub db_latency5m_us: Option<f64>,
#[serde(rename = "dbLatency15mUs", skip_serializing_if = "Option::is_none")]
pub db_latency15m_us: Option<f64>,
#[serde(rename = "dbQueriesPerSec", skip_serializing_if = "Option::is_none")]
pub db_queries_per_sec: Option<f64>,
#[serde(rename = "dbConnsInUse", skip_serializing_if = "Option::is_none")]
pub db_conns_in_use: Option<i64>,
#[serde(rename = "dbConnsMax", skip_serializing_if = "Option::is_none")]
pub db_conns_max: Option<i64>,
#[serde(rename = "dbConnsIdle", skip_serializing_if = "Option::is_none")]
pub db_conns_idle: Option<i64>,
#[serde(rename = "dbConnsFree", skip_serializing_if = "Option::is_none")]
pub db_conns_free: Option<i64>,
#[serde(rename = "dbConnsInUse1m", skip_serializing_if = "Option::is_none")]
pub db_conns_in_use1m: Option<f64>,
#[serde(rename = "dbConnsInUse5m", skip_serializing_if = "Option::is_none")]
pub db_conns_in_use5m: Option<f64>,
#[serde(rename = "dbConnsInUse15m", skip_serializing_if = "Option::is_none")]
pub db_conns_in_use15m: Option<f64>,
#[serde(rename = "dbPingAvgUs", skip_serializing_if = "Option::is_none")]
pub db_ping_avg_us: Option<f64>,
#[serde(rename = "dbPingMinUs", skip_serializing_if = "Option::is_none")]
pub db_ping_min_us: Option<f64>,
#[serde(rename = "dbPingMaxUs", skip_serializing_if = "Option::is_none")]
pub db_ping_max_us: Option<f64>,
#[serde(rename = "dbPingStdDevUs", skip_serializing_if = "Option::is_none")]
pub db_ping_std_dev_us: Option<f64>,
#[serde(rename = "dbDispatchOutstanding", skip_serializing_if = "Option::is_none")]
pub db_dispatch_outstanding: Option<i64>,
#[serde(rename = "dbDispatchLaneCap", skip_serializing_if = "Option::is_none")]
pub db_dispatch_lane_cap: Option<i64>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct Ref {
pub id: i64,
pub name: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct RegionVolumeMetrics {
#[serde(rename = "regionId")]
pub region_id: i64,
#[serde(rename = "regionName")]
pub region_name: String,
#[serde(rename = "volumeCount")]
pub volume_count: i64,
#[serde(rename = "totalVolumeUsed")]
pub total_volume_used: i64,
#[serde(rename = "totalQuotaLimit")]
pub total_quota_limit: i64,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[non_exhaustive]
pub struct RetentionPolicy {
#[serde(rename = "clientSessionDays", skip_serializing_if = "Option::is_none")]
pub client_session_days: Option<i32>,
}
impl RetentionPolicy {
pub fn with_client_session_days(mut self, value: i32) -> Self {
self.client_session_days = Some(value);
self
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct SessionSummaryFacet {
pub label: String,
pub count: i64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct SessionSummaryStatusEntry {
#[serde(rename = "clientType")]
pub client_type: String,
pub status: String,
pub count: i64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct UserLite {
pub id: i64,
pub username: String,
pub name: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct VolumeApiKey {
#[serde(rename = "apiKey")]
pub api_key: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
#[serde(rename = "lastUsedAt", skip_serializing_if = "Option::is_none")]
pub last_used_at: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct VolumeRef {
pub id: i64,
pub name: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub r#type: Option<String>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[non_exhaustive]
pub struct VolumeRetentionPolicy {
#[serde(rename = "dataDays", skip_serializing_if = "Option::is_none")]
pub data_days: Option<i32>,
#[serde(rename = "graceDays", skip_serializing_if = "Option::is_none")]
pub grace_days: Option<i32>,
#[serde(rename = "forkGraceDays", skip_serializing_if = "Option::is_none")]
pub fork_grace_days: Option<i32>,
#[serde(rename = "eventLogDays", skip_serializing_if = "Option::is_none")]
pub event_log_days: Option<i32>,
}
impl VolumeRetentionPolicy {
pub fn with_data_days(mut self, value: i32) -> Self {
self.data_days = Some(value);
self
}
pub fn with_grace_days(mut self, value: i32) -> Self {
self.grace_days = Some(value);
self
}
pub fn with_fork_grace_days(mut self, value: i32) -> Self {
self.fork_grace_days = Some(value);
self
}
pub fn with_event_log_days(mut self, value: i32) -> Self {
self.event_log_days = Some(value);
self
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct VolumeSizePoint {
#[serde(rename = "bucketEnd")]
pub bucket_end: String,
#[serde(rename = "liveVolume")]
pub live_volume: i64,
#[serde(rename = "totalVolume")]
pub total_volume: i64,
#[serde(rename = "pendingVolume")]
pub pending_volume: i64,
#[serde(rename = "liveInactiveVolume")]
pub live_inactive_volume: i64,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[non_exhaustive]
pub struct VolumeVersioningPolicy {
#[serde(rename = "contentWindowSeconds", skip_serializing_if = "Option::is_none")]
pub content_window_seconds: Option<i32>,
}
impl VolumeVersioningPolicy {
pub fn with_content_window_seconds(mut self, value: i32) -> Self {
self.content_window_seconds = Some(value);
self
}
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct CreateAccountRequest {
pub name: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "iconUrl", skip_serializing_if = "Option::is_none")]
pub icon_url: Option<String>,
#[serde(rename = "providerInfo", skip_serializing_if = "Option::is_none")]
pub provider_info: Option<serde_json::Value>,
}
impl CreateAccountRequest {
pub fn new(name: impl Into<String>) -> Self {
Self {
name: name.into(),
description: None,
icon_url: None,
provider_info: None,
}
}
pub fn with_description(mut self, value: impl Into<String>) -> Self {
self.description = Some(value.into());
self
}
pub fn with_icon_url(mut self, value: impl Into<String>) -> Self {
self.icon_url = Some(value.into());
self
}
pub fn with_provider_info(mut self, value: serde_json::Value) -> Self {
self.provider_info = Some(value);
self
}
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct EditAccountRequest {
pub name: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "iconUrl", skip_serializing_if = "Option::is_none")]
pub icon_url: Option<String>,
#[serde(rename = "providerInfo", skip_serializing_if = "Option::is_none")]
pub provider_info: Option<serde_json::Value>,
#[serde(skip_serializing_if = "Option::is_none")]
pub retention: Option<RetentionPolicy>,
}
impl EditAccountRequest {
pub fn new(name: impl Into<String>) -> Self {
Self {
name: name.into(),
description: None,
icon_url: None,
provider_info: None,
retention: None,
}
}
pub fn with_description(mut self, value: impl Into<String>) -> Self {
self.description = Some(value.into());
self
}
pub fn with_icon_url(mut self, value: impl Into<String>) -> Self {
self.icon_url = Some(value.into());
self
}
pub fn with_provider_info(mut self, value: serde_json::Value) -> Self {
self.provider_info = Some(value);
self
}
pub fn with_retention(mut self, value: RetentionPolicy) -> Self {
self.retention = Some(value);
self
}
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct UpdateAccountQuotaRequest {
#[serde(rename = "quotaLimit")]
pub quota_limit: i64,
#[serde(rename = "quotaExcessPct", skip_serializing_if = "Option::is_none")]
pub quota_excess_pct: Option<i32>,
}
impl UpdateAccountQuotaRequest {
pub fn new(quota_limit: i64) -> Self {
Self {
quota_limit,
quota_excess_pct: None,
}
}
pub fn with_quota_excess_pct(mut self, value: i32) -> Self {
self.quota_excess_pct = Some(value);
self
}
}
#[derive(Debug, Clone, Default)]
#[non_exhaustive]
pub struct AccountListOptions {
pub is_active: Option<bool>,
pub page: Option<i64>,
pub limit: Option<i64>,
}
impl AccountListOptions {
pub fn with_is_active(mut self, value: bool) -> Self {
self.is_active = Some(value);
self
}
pub fn with_page(mut self, value: i64) -> Self {
self.page = Some(value);
self
}
pub fn with_limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct AddUserRequest {
#[serde(rename = "accountId")]
pub account_id: i64,
pub username: String,
pub email: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "providerInfo", skip_serializing_if = "Option::is_none")]
pub provider_info: Option<serde_json::Value>,
}
impl AddUserRequest {
pub fn new(account_id: i64, username: impl Into<String>, email: impl Into<String>) -> Self {
Self {
account_id,
username: username.into(),
email: email.into(),
name: None,
provider_info: None,
}
}
pub fn with_name(mut self, value: impl Into<String>) -> Self {
self.name = Some(value.into());
self
}
pub fn with_provider_info(mut self, value: serde_json::Value) -> Self {
self.provider_info = Some(value);
self
}
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct BulkUserRequest {
pub ids: Vec<i64>,
}
impl BulkUserRequest {
pub fn new(ids: Vec<i64>) -> Self {
Self {
ids,
}
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct BulkUserResponse {
pub users: Vec<UserLite>,
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct EditUserRequest {
pub username: String,
pub email: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "providerInfo", skip_serializing_if = "Option::is_none")]
pub provider_info: Option<serde_json::Value>,
}
impl EditUserRequest {
pub fn new(username: impl Into<String>, email: impl Into<String>) -> Self {
Self {
username: username.into(),
email: email.into(),
name: None,
provider_info: None,
}
}
pub fn with_name(mut self, value: impl Into<String>) -> Self {
self.name = Some(value.into());
self
}
pub fn with_provider_info(mut self, value: serde_json::Value) -> Self {
self.provider_info = Some(value);
self
}
}
#[derive(Debug, Clone, Default)]
#[non_exhaustive]
pub struct UserListOptions {
pub account_id: i64,
pub search: Option<String>,
pub is_active: Option<bool>,
pub page: Option<i64>,
pub limit: Option<i64>,
}
impl UserListOptions {
pub fn new(account_id: i64) -> Self {
Self {
account_id,
search: None,
is_active: None,
page: None,
limit: None,
}
}
pub fn with_search(mut self, value: impl Into<String>) -> Self {
self.search = Some(value.into());
self
}
pub fn with_is_active(mut self, value: bool) -> Self {
self.is_active = Some(value);
self
}
pub fn with_page(mut self, value: i64) -> Self {
self.page = Some(value);
self
}
pub fn with_limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct CreateRegionRequest {
#[serde(rename = "accountId")]
pub account_id: i64,
pub name: String,
}
impl CreateRegionRequest {
pub fn new(account_id: i64, name: impl Into<String>) -> Self {
Self {
account_id,
name: name.into(),
}
}
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct EditRegionRequest {
#[serde(rename = "accountId")]
pub account_id: i64,
pub name: String,
}
impl EditRegionRequest {
pub fn new(account_id: i64, name: impl Into<String>) -> Self {
Self {
account_id,
name: name.into(),
}
}
}
#[derive(Debug, Clone, Default)]
#[non_exhaustive]
pub struct RegionListOptions {
pub account_id: i64,
pub is_active: Option<bool>,
pub page: Option<i64>,
pub limit: Option<i64>,
}
impl RegionListOptions {
pub fn new(account_id: i64) -> Self {
Self {
account_id,
is_active: None,
page: None,
limit: None,
}
}
pub fn with_is_active(mut self, value: bool) -> Self {
self.is_active = Some(value);
self
}
pub fn with_page(mut self, value: i64) -> Self {
self.page = Some(value);
self
}
pub fn with_limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
}
#[derive(Debug, Clone, Default)]
#[non_exhaustive]
pub struct ClusterListOptions {
pub account_id: i64,
pub region_id: Option<i64>,
pub is_active: Option<bool>,
pub page: Option<i64>,
pub limit: Option<i64>,
}
impl ClusterListOptions {
pub fn new(account_id: i64) -> Self {
Self {
account_id,
region_id: None,
is_active: None,
page: None,
limit: None,
}
}
pub fn with_region_id(mut self, value: i64) -> Self {
self.region_id = Some(value);
self
}
pub fn with_is_active(mut self, value: bool) -> Self {
self.is_active = Some(value);
self
}
pub fn with_page(mut self, value: i64) -> Self {
self.page = Some(value);
self
}
pub fn with_limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct CreateMetadataClusterRequest {
pub name: String,
}
impl CreateMetadataClusterRequest {
pub fn new(name: impl Into<String>) -> Self {
Self {
name: name.into(),
}
}
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct EditMetadataClusterRequest {
pub name: String,
}
impl EditMetadataClusterRequest {
pub fn new(name: impl Into<String>) -> Self {
Self {
name: name.into(),
}
}
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct SetMetadataClusterReadyRequest {
pub ready: bool,
}
impl SetMetadataClusterReadyRequest {
pub fn new(ready: bool) -> Self {
Self {
ready,
}
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct SetReadyMetadataClusterResponse {
pub id: i64,
pub ready: bool,
}
#[derive(Debug, Clone, Default)]
#[non_exhaustive]
pub struct MetadataClusterListOptions {
pub is_active: Option<bool>,
pub page: Option<i64>,
pub limit: Option<i64>,
}
impl MetadataClusterListOptions {
pub fn with_is_active(mut self, value: bool) -> Self {
self.is_active = Some(value);
self
}
pub fn with_page(mut self, value: i64) -> Self {
self.page = Some(value);
self
}
pub fn with_limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct CreateStorageRequest {
#[serde(rename = "accountId")]
pub account_id: i64,
#[serde(rename = "regionId")]
pub region_id: i64,
pub name: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "storageType")]
pub storage_type: String,
#[serde(rename = "providerType")]
pub provider_type: String,
pub endpoint: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub region: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub bucket: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub base: Option<String>,
#[serde(rename = "blockRegion", skip_serializing_if = "Option::is_none")]
pub block_region: Option<String>,
#[serde(rename = "blockSize", skip_serializing_if = "Option::is_none")]
pub block_size: Option<i32>,
#[serde(rename = "accessKey", skip_serializing_if = "Option::is_none")]
pub access_key: Option<String>,
#[serde(rename = "secretKey", skip_serializing_if = "Option::is_none")]
pub secret_key: Option<String>,
}
impl CreateStorageRequest {
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 {
Self {
account_id,
region_id,
name: name.into(),
storage_type: storage_type.into(),
provider_type: provider_type.into(),
endpoint: endpoint.into(),
description: None,
region: None,
bucket: None,
base: None,
block_region: None,
block_size: None,
access_key: None,
secret_key: None,
}
}
pub fn with_description(mut self, value: impl Into<String>) -> Self {
self.description = Some(value.into());
self
}
pub fn with_region(mut self, value: impl Into<String>) -> Self {
self.region = Some(value.into());
self
}
pub fn with_bucket(mut self, value: impl Into<String>) -> Self {
self.bucket = Some(value.into());
self
}
pub fn with_base(mut self, value: impl Into<String>) -> Self {
self.base = Some(value.into());
self
}
pub fn with_block_region(mut self, value: impl Into<String>) -> Self {
self.block_region = Some(value.into());
self
}
pub fn with_block_size(mut self, value: i32) -> Self {
self.block_size = Some(value);
self
}
pub fn with_access_key(mut self, value: impl Into<String>) -> Self {
self.access_key = Some(value.into());
self
}
pub fn with_secret_key(mut self, value: impl Into<String>) -> Self {
self.secret_key = Some(value.into());
self
}
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct EditStorageRequest {
pub name: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub endpoint: Option<String>,
#[serde(rename = "accessKey", skip_serializing_if = "Option::is_none")]
pub access_key: Option<String>,
#[serde(rename = "secretKey", skip_serializing_if = "Option::is_none")]
pub secret_key: Option<String>,
#[serde(rename = "directAccess", skip_serializing_if = "Option::is_none")]
pub direct_access: Option<bool>,
}
impl EditStorageRequest {
pub fn new(name: impl Into<String>) -> Self {
Self {
name: name.into(),
description: None,
endpoint: None,
access_key: None,
secret_key: None,
direct_access: None,
}
}
pub fn with_description(mut self, value: impl Into<String>) -> Self {
self.description = Some(value.into());
self
}
pub fn with_endpoint(mut self, value: impl Into<String>) -> Self {
self.endpoint = Some(value.into());
self
}
pub fn with_access_key(mut self, value: impl Into<String>) -> Self {
self.access_key = Some(value.into());
self
}
pub fn with_secret_key(mut self, value: impl Into<String>) -> Self {
self.secret_key = Some(value.into());
self
}
pub fn with_direct_access(mut self, value: bool) -> Self {
self.direct_access = Some(value);
self
}
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct TestStorageNewBucketRequest {
pub endpoint: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub region: Option<String>,
pub bucket: String,
#[serde(rename = "accessKey")]
pub access_key: String,
#[serde(rename = "secretKey")]
pub secret_key: String,
#[serde(rename = "providerType", skip_serializing_if = "Option::is_none")]
pub provider_type: Option<String>,
}
impl TestStorageNewBucketRequest {
pub fn new(endpoint: impl Into<String>, bucket: impl Into<String>, access_key: impl Into<String>, secret_key: impl Into<String>) -> Self {
Self {
endpoint: endpoint.into(),
bucket: bucket.into(),
access_key: access_key.into(),
secret_key: secret_key.into(),
region: None,
provider_type: None,
}
}
pub fn with_region(mut self, value: impl Into<String>) -> Self {
self.region = Some(value.into());
self
}
pub fn with_provider_type(mut self, value: impl Into<String>) -> Self {
self.provider_type = Some(value.into());
self
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct TestNewBucketStorageResponse {
#[serde(rename = "bucketExists")]
pub bucket_exists: bool,
pub list: bool,
pub write: bool,
pub read: bool,
pub delete: bool,
pub multipart: bool,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct TestStorageBucketStorageResponse {
#[serde(rename = "bucketExists")]
pub bucket_exists: bool,
pub list: bool,
pub write: bool,
pub read: bool,
pub delete: bool,
pub multipart: bool,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct ListCompatibleStorageResponse {
pub storages: Vec<CompatibleStorage>,
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct MoveStorageVolumesRequest {
#[serde(rename = "volumeIds")]
pub volume_ids: Vec<String>,
}
impl MoveStorageVolumesRequest {
pub fn new(volume_ids: Vec<String>) -> Self {
Self {
volume_ids,
}
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct MoveVolumesStorageResponse {
pub moved: Vec<String>,
pub failures: Vec<MoveVolumeFailure>,
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct DrainStorageCopysetRequest {
#[serde(skip_serializing_if = "Option::is_none")]
pub force: Option<bool>,
}
impl DrainStorageCopysetRequest {
pub fn with_force(mut self, value: bool) -> Self {
self.force = Some(value);
self
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct DrainCopysetStorageResponse {
pub id: String,
pub state: String,
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct CancelStorageDrainRequest {
#[serde(skip_serializing_if = "Option::is_none")]
pub force: Option<bool>,
}
impl CancelStorageDrainRequest {
pub fn with_force(mut self, value: bool) -> Self {
self.force = Some(value);
self
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct CancelDrainStorageResponse {
pub id: String,
pub state: String,
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct UpdateStorageTagsRequest {
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<String>>,
}
impl UpdateStorageTagsRequest {
pub fn with_tags(mut self, value: Vec<String>) -> Self {
self.tags = Some(value);
self
}
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct RegisterStorageCopysetRequest {
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "failureDomainA", skip_serializing_if = "Option::is_none")]
pub failure_domain_a: Option<String>,
#[serde(rename = "failureDomainB", skip_serializing_if = "Option::is_none")]
pub failure_domain_b: Option<String>,
}
impl RegisterStorageCopysetRequest {
pub fn with_name(mut self, value: impl Into<String>) -> Self {
self.name = Some(value.into());
self
}
pub fn with_failure_domain_a(mut self, value: impl Into<String>) -> Self {
self.failure_domain_a = Some(value.into());
self
}
pub fn with_failure_domain_b(mut self, value: impl Into<String>) -> Self {
self.failure_domain_b = Some(value.into());
self
}
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct RegisterStorageCopysetsBulkRequest {
pub count: i32,
#[serde(rename = "failureDomainA", skip_serializing_if = "Option::is_none")]
pub failure_domain_a: Option<String>,
#[serde(rename = "failureDomainB", skip_serializing_if = "Option::is_none")]
pub failure_domain_b: Option<String>,
}
impl RegisterStorageCopysetsBulkRequest {
pub fn new(count: i32) -> Self {
Self {
count,
failure_domain_a: None,
failure_domain_b: None,
}
}
pub fn with_failure_domain_a(mut self, value: impl Into<String>) -> Self {
self.failure_domain_a = Some(value.into());
self
}
pub fn with_failure_domain_b(mut self, value: impl Into<String>) -> Self {
self.failure_domain_b = Some(value.into());
self
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct RegisterCopysetsBulkStorageResponse {
pub copysets: Vec<Copyset>,
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct AddStorageCopysetMemberRequest {
#[serde(rename = "failureDomain", skip_serializing_if = "Option::is_none")]
pub failure_domain: Option<String>,
}
impl AddStorageCopysetMemberRequest {
pub fn with_failure_domain(mut self, value: impl Into<String>) -> Self {
self.failure_domain = Some(value.into());
self
}
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct MarkStorageMemberLostRequest {
#[serde(rename = "blockVolumeId")]
pub block_volume_id: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub force: Option<bool>,
}
impl MarkStorageMemberLostRequest {
pub fn new(block_volume_id: impl Into<String>) -> Self {
Self {
block_volume_id: block_volume_id.into(),
force: None,
}
}
pub fn with_force(mut self, value: bool) -> Self {
self.force = Some(value);
self
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct RemoveMemberStorageResponse {
pub id: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct BackfillFingerprintsStorageResponse {
pub scanned: i32,
pub updated: i32,
pub failures: Vec<BackfillFailure>,
#[serde(rename = "hasMore")]
pub has_more: bool,
}
#[derive(Debug, Clone, Default)]
#[non_exhaustive]
pub struct StorageListOptions {
pub account_id: i64,
pub search: Option<String>,
pub region_id: Option<i64>,
pub storage_type: Option<String>,
pub provider_type: Option<String>,
pub is_active: Option<bool>,
pub direct_access: Option<bool>,
pub page: Option<i64>,
pub limit: Option<i64>,
}
impl StorageListOptions {
pub fn new(account_id: i64) -> Self {
Self {
account_id,
search: None,
region_id: None,
storage_type: None,
provider_type: None,
is_active: None,
direct_access: None,
page: None,
limit: None,
}
}
pub fn with_search(mut self, value: impl Into<String>) -> Self {
self.search = Some(value.into());
self
}
pub fn with_region_id(mut self, value: i64) -> Self {
self.region_id = Some(value);
self
}
pub fn with_storage_type(mut self, value: impl Into<String>) -> Self {
self.storage_type = Some(value.into());
self
}
pub fn with_provider_type(mut self, value: impl Into<String>) -> Self {
self.provider_type = Some(value.into());
self
}
pub fn with_is_active(mut self, value: bool) -> Self {
self.is_active = Some(value);
self
}
pub fn with_direct_access(mut self, value: bool) -> Self {
self.direct_access = Some(value);
self
}
pub fn with_page(mut self, value: i64) -> Self {
self.page = Some(value);
self
}
pub fn with_limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct CreateVolumeRequest {
#[serde(rename = "accountId")]
pub account_id: i64,
#[serde(rename = "storageId")]
pub storage_id: i64,
pub name: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "volumeType")]
pub volume_type: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub encryption: Option<bool>,
#[serde(rename = "encryptionKey", skip_serializing_if = "Option::is_none")]
pub encryption_key: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub retention: Option<VolumeRetentionPolicy>,
#[serde(skip_serializing_if = "Option::is_none")]
pub versioning: Option<VolumeVersioningPolicy>,
#[serde(skip_serializing_if = "Option::is_none")]
pub compaction: Option<String>,
#[serde(rename = "quotaLimit", skip_serializing_if = "Option::is_none")]
pub quota_limit: Option<i64>,
#[serde(rename = "metadataClusterId", skip_serializing_if = "Option::is_none")]
pub metadata_cluster_id: Option<i64>,
#[serde(rename = "metadataClusterUuid", skip_serializing_if = "Option::is_none")]
pub metadata_cluster_uuid: Option<String>,
}
impl CreateVolumeRequest {
pub fn new(account_id: i64, storage_id: i64, name: impl Into<String>, volume_type: impl Into<String>) -> Self {
Self {
account_id,
storage_id,
name: name.into(),
volume_type: volume_type.into(),
description: None,
encryption: None,
encryption_key: None,
retention: None,
versioning: None,
compaction: None,
quota_limit: None,
metadata_cluster_id: None,
metadata_cluster_uuid: None,
}
}
pub fn with_description(mut self, value: impl Into<String>) -> Self {
self.description = Some(value.into());
self
}
pub fn with_encryption(mut self, value: bool) -> Self {
self.encryption = Some(value);
self
}
pub fn with_encryption_key(mut self, value: impl Into<String>) -> Self {
self.encryption_key = Some(value.into());
self
}
pub fn with_retention(mut self, value: VolumeRetentionPolicy) -> Self {
self.retention = Some(value);
self
}
pub fn with_versioning(mut self, value: VolumeVersioningPolicy) -> Self {
self.versioning = Some(value);
self
}
pub fn with_compaction(mut self, value: impl Into<String>) -> Self {
self.compaction = Some(value.into());
self
}
pub fn with_quota_limit(mut self, value: i64) -> Self {
self.quota_limit = Some(value);
self
}
pub fn with_metadata_cluster_id(mut self, value: i64) -> Self {
self.metadata_cluster_id = Some(value);
self
}
pub fn with_metadata_cluster_uuid(mut self, value: impl Into<String>) -> Self {
self.metadata_cluster_uuid = Some(value.into());
self
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct CreateVolumeResponse {
pub id: i64,
#[serde(rename = "encryptionKey", skip_serializing_if = "Option::is_none")]
pub encryption_key: Option<String>,
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct EditVolumeRequest {
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub retention: Option<VolumeRetentionPolicy>,
#[serde(skip_serializing_if = "Option::is_none")]
pub versioning: Option<VolumeVersioningPolicy>,
#[serde(skip_serializing_if = "Option::is_none")]
pub compaction: Option<String>,
}
impl EditVolumeRequest {
pub fn with_description(mut self, value: impl Into<String>) -> Self {
self.description = Some(value.into());
self
}
pub fn with_retention(mut self, value: VolumeRetentionPolicy) -> Self {
self.retention = Some(value);
self
}
pub fn with_versioning(mut self, value: VolumeVersioningPolicy) -> Self {
self.versioning = Some(value);
self
}
pub fn with_compaction(mut self, value: impl Into<String>) -> Self {
self.compaction = Some(value.into());
self
}
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct MoveVolumeClusterRequest {
#[serde(rename = "targetClusterId", skip_serializing_if = "Option::is_none")]
pub target_cluster_id: Option<i64>,
#[serde(rename = "targetClusterUuid", skip_serializing_if = "Option::is_none")]
pub target_cluster_uuid: Option<String>,
}
impl MoveVolumeClusterRequest {
pub fn with_target_cluster_id(mut self, value: i64) -> Self {
self.target_cluster_id = Some(value);
self
}
pub fn with_target_cluster_uuid(mut self, value: impl Into<String>) -> Self {
self.target_cluster_uuid = Some(value.into());
self
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct MoveClusterVolumeResponse {
pub id: i64,
#[serde(rename = "sourceClusterId")]
pub source_cluster_id: i64,
#[serde(rename = "targetClusterId")]
pub target_cluster_id: i64,
#[serde(rename = "handoverUntil")]
pub handover_until: i64,
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct DeactivateVolumeRequest {
#[serde(rename = "isCleanupMetaEnabled", skip_serializing_if = "Option::is_none")]
pub is_cleanup_meta_enabled: Option<bool>,
#[serde(rename = "isCleanupStorageEnabled", skip_serializing_if = "Option::is_none")]
pub is_cleanup_storage_enabled: Option<bool>,
#[serde(rename = "isCleanupVaultEnabled", skip_serializing_if = "Option::is_none")]
pub is_cleanup_vault_enabled: Option<bool>,
}
impl DeactivateVolumeRequest {
pub fn with_is_cleanup_meta_enabled(mut self, value: bool) -> Self {
self.is_cleanup_meta_enabled = Some(value);
self
}
pub fn with_is_cleanup_storage_enabled(mut self, value: bool) -> Self {
self.is_cleanup_storage_enabled = Some(value);
self
}
pub fn with_is_cleanup_vault_enabled(mut self, value: bool) -> Self {
self.is_cleanup_vault_enabled = Some(value);
self
}
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct GenerateVolumeAPIKeysRequest {
#[serde(rename = "userId")]
pub user_id: i64,
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
impl GenerateVolumeAPIKeysRequest {
pub fn new(user_id: i64) -> Self {
Self {
user_id,
name: None,
}
}
pub fn with_name(mut self, value: impl Into<String>) -> Self {
self.name = Some(value.into());
self
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct GenerateAPIKeysVolumeResponse {
#[serde(rename = "apiKey")]
pub api_key: String,
#[serde(rename = "apiSecret")]
pub api_secret: String,
#[serde(rename = "evictedApiKeys", skip_serializing_if = "Option::is_none")]
pub evicted_api_keys: Option<Vec<String>>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct ListAPIKeysVolumeResponse {
pub keys: Vec<VolumeApiKey>,
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct RevokeVolumeAPIKeyRequest {
#[serde(rename = "apiKey")]
pub api_key: String,
}
impl RevokeVolumeAPIKeyRequest {
pub fn new(api_key: impl Into<String>) -> Self {
Self {
api_key: api_key.into(),
}
}
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct RevokeVolumeAPIKeysByUserRequest {
#[serde(rename = "userId")]
pub user_id: i64,
}
impl RevokeVolumeAPIKeysByUserRequest {
pub fn new(user_id: i64) -> Self {
Self {
user_id,
}
}
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct GenerateVolumeSttKeyRequest {
#[serde(rename = "userId", skip_serializing_if = "Option::is_none")]
pub user_id: Option<i64>,
#[serde(rename = "expirySeconds")]
pub expiry_seconds: i64,
}
impl GenerateVolumeSttKeyRequest {
pub fn new(expiry_seconds: i64) -> Self {
Self {
expiry_seconds,
user_id: None,
}
}
pub fn with_user_id(mut self, value: i64) -> Self {
self.user_id = Some(value);
self
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct GenerateSttKeyVolumeResponse {
#[serde(rename = "apiKey")]
pub api_key: String,
#[serde(rename = "apiSecret")]
pub api_secret: String,
#[serde(rename = "expiresAt")]
pub expires_at: String,
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct UpdateVolumeQuotaRequest {
#[serde(rename = "quotaLimit")]
pub quota_limit: i64,
}
impl UpdateVolumeQuotaRequest {
pub fn new(quota_limit: i64) -> Self {
Self {
quota_limit,
}
}
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct UpdateVolumeCopysetConfigRequest {
#[serde(rename = "targetCopysetCount")]
pub target_copyset_count: i32,
}
impl UpdateVolumeCopysetConfigRequest {
pub fn new(target_copyset_count: i32) -> Self {
Self {
target_copyset_count,
}
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct StatsVolumeResponse {
#[serde(rename = "volumeId")]
pub volume_id: String,
#[serde(rename = "liveVolume")]
pub live_volume: i64,
#[serde(rename = "totalVolume")]
pub total_volume: i64,
#[serde(rename = "pendingVolume")]
pub pending_volume: i64,
#[serde(rename = "liveInactiveVolume")]
pub live_inactive_volume: i64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct SizeHistoryVolumeResponse {
pub points: Vec<VolumeSizePoint>,
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct CreateVolumeForkRequest {
pub name: String,
#[serde(rename = "parentName", skip_serializing_if = "Option::is_none")]
pub parent_name: Option<String>,
#[serde(rename = "asOf", skip_serializing_if = "Option::is_none")]
pub as_of: Option<i64>,
#[serde(rename = "volumeType", skip_serializing_if = "Option::is_none")]
pub volume_type: Option<String>,
}
impl CreateVolumeForkRequest {
pub fn new(name: impl Into<String>) -> Self {
Self {
name: name.into(),
parent_name: None,
as_of: None,
volume_type: None,
}
}
pub fn with_parent_name(mut self, value: impl Into<String>) -> Self {
self.parent_name = Some(value.into());
self
}
pub fn with_as_of(mut self, value: i64) -> Self {
self.as_of = Some(value);
self
}
pub fn with_volume_type(mut self, value: impl Into<String>) -> Self {
self.volume_type = Some(value.into());
self
}
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct DeleteVolumeForkRequest {
#[serde(skip_serializing_if = "Option::is_none")]
pub force: Option<bool>,
#[serde(rename = "volumeType", skip_serializing_if = "Option::is_none")]
pub volume_type: Option<String>,
}
impl DeleteVolumeForkRequest {
pub fn with_force(mut self, value: bool) -> Self {
self.force = Some(value);
self
}
pub fn with_volume_type(mut self, value: impl Into<String>) -> Self {
self.volume_type = Some(value.into());
self
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct DeleteForkVolumeResponse {
#[serde(rename = "inactivatedFids")]
pub inactivated_fids: Vec<i32>,
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct RestoreVolumeForkRequest {
#[serde(rename = "volumeType", skip_serializing_if = "Option::is_none")]
pub volume_type: Option<String>,
}
impl RestoreVolumeForkRequest {
pub fn with_volume_type(mut self, value: impl Into<String>) -> Self {
self.volume_type = Some(value.into());
self
}
}
#[derive(Debug, Clone, Default)]
#[non_exhaustive]
pub struct VolumeListOptions {
pub account_id: i64,
pub region_id: Option<i64>,
pub metadata_cluster_id: Option<i64>,
pub storage_id: Option<i64>,
pub volume_type: Option<String>,
pub locked: Option<bool>,
pub is_active: Option<bool>,
pub page: Option<i64>,
pub limit: Option<i64>,
}
impl VolumeListOptions {
pub fn new(account_id: i64) -> Self {
Self {
account_id,
region_id: None,
metadata_cluster_id: None,
storage_id: None,
volume_type: None,
locked: None,
is_active: None,
page: None,
limit: None,
}
}
pub fn with_region_id(mut self, value: i64) -> Self {
self.region_id = Some(value);
self
}
pub fn with_metadata_cluster_id(mut self, value: i64) -> Self {
self.metadata_cluster_id = Some(value);
self
}
pub fn with_storage_id(mut self, value: i64) -> Self {
self.storage_id = Some(value);
self
}
pub fn with_volume_type(mut self, value: impl Into<String>) -> Self {
self.volume_type = Some(value.into());
self
}
pub fn with_locked(mut self, value: bool) -> Self {
self.locked = Some(value);
self
}
pub fn with_is_active(mut self, value: bool) -> Self {
self.is_active = Some(value);
self
}
pub fn with_page(mut self, value: i64) -> Self {
self.page = Some(value);
self
}
pub fn with_limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
}
#[derive(Debug, Clone, Default)]
#[non_exhaustive]
pub struct VolumeForkTreeListOptions {
pub path: Option<String>,
pub as_of: Option<i64>,
pub cursor: Option<String>,
pub limit: Option<i64>,
pub sort: Option<String>,
pub kind: Option<String>,
}
impl VolumeForkTreeListOptions {
pub fn with_path(mut self, value: impl Into<String>) -> Self {
self.path = Some(value.into());
self
}
pub fn with_as_of(mut self, value: i64) -> Self {
self.as_of = Some(value);
self
}
pub fn with_cursor(mut self, value: impl Into<String>) -> Self {
self.cursor = Some(value.into());
self
}
pub fn with_limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
pub fn with_sort(mut self, value: impl Into<String>) -> Self {
self.sort = Some(value.into());
self
}
pub fn with_kind(mut self, value: impl Into<String>) -> Self {
self.kind = Some(value.into());
self
}
}
#[derive(Debug, Clone, Default)]
#[non_exhaustive]
pub struct VolumeForkEntryListOptions {
pub path: Option<String>,
pub cursor: Option<i64>,
pub limit: Option<i64>,
}
impl VolumeForkEntryListOptions {
pub fn with_path(mut self, value: impl Into<String>) -> Self {
self.path = Some(value.into());
self
}
pub fn with_cursor(mut self, value: i64) -> Self {
self.cursor = Some(value);
self
}
pub fn with_limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
}
#[derive(Debug, Clone, Default)]
#[non_exhaustive]
pub struct VolumeForkSearchListOptions {
pub q: Option<String>,
pub path: Option<String>,
pub as_of: Option<i64>,
pub exact: Option<bool>,
pub cursor: Option<i64>,
pub limit: Option<i64>,
pub kind: Option<String>,
}
impl VolumeForkSearchListOptions {
pub fn with_q(mut self, value: impl Into<String>) -> Self {
self.q = Some(value.into());
self
}
pub fn with_path(mut self, value: impl Into<String>) -> Self {
self.path = Some(value.into());
self
}
pub fn with_as_of(mut self, value: i64) -> Self {
self.as_of = Some(value);
self
}
pub fn with_exact(mut self, value: bool) -> Self {
self.exact = Some(value);
self
}
pub fn with_cursor(mut self, value: i64) -> Self {
self.cursor = Some(value);
self
}
pub fn with_limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
pub fn with_kind(mut self, value: impl Into<String>) -> Self {
self.kind = Some(value.into());
self
}
}
#[derive(Debug, Clone, Default)]
#[non_exhaustive]
pub struct AuditLogListOptions {
pub account_id: i64,
pub region_id: Option<i64>,
pub metadata_cluster_id: Option<i64>,
pub cursor: Option<i64>,
pub limit: Option<i64>,
pub subject: Option<String>,
pub created_by: Option<String>,
}
impl AuditLogListOptions {
pub fn new(account_id: i64) -> Self {
Self {
account_id,
region_id: None,
metadata_cluster_id: None,
cursor: None,
limit: None,
subject: None,
created_by: None,
}
}
pub fn with_region_id(mut self, value: i64) -> Self {
self.region_id = Some(value);
self
}
pub fn with_metadata_cluster_id(mut self, value: i64) -> Self {
self.metadata_cluster_id = Some(value);
self
}
pub fn with_cursor(mut self, value: i64) -> Self {
self.cursor = Some(value);
self
}
pub fn with_limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
pub fn with_subject(mut self, value: impl Into<String>) -> Self {
self.subject = Some(value.into());
self
}
pub fn with_created_by(mut self, value: impl Into<String>) -> Self {
self.created_by = Some(value.into());
self
}
}
#[derive(Debug, Clone, Default)]
#[non_exhaustive]
pub struct RegionAuditLogListOptions {
pub metadata_cluster_id: Option<i64>,
pub cursor: Option<i64>,
pub limit: Option<i64>,
pub subject: Option<String>,
pub node: Option<String>,
}
impl RegionAuditLogListOptions {
pub fn with_metadata_cluster_id(mut self, value: i64) -> Self {
self.metadata_cluster_id = Some(value);
self
}
pub fn with_cursor(mut self, value: i64) -> Self {
self.cursor = Some(value);
self
}
pub fn with_limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
pub fn with_subject(mut self, value: impl Into<String>) -> Self {
self.subject = Some(value.into());
self
}
pub fn with_node(mut self, value: impl Into<String>) -> Self {
self.node = Some(value.into());
self
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct StatsHistoryServiceNodeResponse {
#[serde(rename = "intervalMs")]
pub interval_ms: i64,
pub samples: Vec<NodeStatsSample>,
}
#[derive(Debug, Clone, Default)]
#[non_exhaustive]
pub struct ClientSessionListOptions {
pub account_id: i64,
pub region_id: Option<i64>,
pub metadata_cluster_id: Option<i64>,
pub volume_id: Option<i64>,
pub user_id: Option<i64>,
pub client_type: Option<String>,
pub status: Option<ClientSessionStatus>,
pub is_active: Option<bool>,
pub os_name: Option<String>,
pub platform: Option<String>,
pub search: Option<String>,
pub page: Option<i64>,
pub limit: Option<i64>,
}
impl ClientSessionListOptions {
pub fn new(account_id: i64) -> Self {
Self {
account_id,
region_id: None,
metadata_cluster_id: None,
volume_id: None,
user_id: None,
client_type: None,
status: None,
is_active: None,
os_name: None,
platform: None,
search: None,
page: None,
limit: None,
}
}
pub fn with_region_id(mut self, value: i64) -> Self {
self.region_id = Some(value);
self
}
pub fn with_metadata_cluster_id(mut self, value: i64) -> Self {
self.metadata_cluster_id = Some(value);
self
}
pub fn with_volume_id(mut self, value: i64) -> Self {
self.volume_id = Some(value);
self
}
pub fn with_user_id(mut self, value: i64) -> Self {
self.user_id = Some(value);
self
}
pub fn with_client_type(mut self, value: impl Into<String>) -> Self {
self.client_type = Some(value.into());
self
}
pub fn with_status(mut self, value: ClientSessionStatus) -> Self {
self.status = Some(value);
self
}
pub fn with_is_active(mut self, value: bool) -> Self {
self.is_active = Some(value);
self
}
pub fn with_os_name(mut self, value: impl Into<String>) -> Self {
self.os_name = Some(value.into());
self
}
pub fn with_platform(mut self, value: impl Into<String>) -> Self {
self.platform = Some(value.into());
self
}
pub fn with_search(mut self, value: impl Into<String>) -> Self {
self.search = Some(value.into());
self
}
pub fn with_page(mut self, value: i64) -> Self {
self.page = Some(value);
self
}
pub fn with_limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct GenerateMetricTokenRequest {
#[serde(rename = "expirySeconds")]
pub expiry_seconds: i64,
}
impl GenerateMetricTokenRequest {
pub fn new(expiry_seconds: i64) -> Self {
Self {
expiry_seconds,
}
}
}
#[derive(Debug, Clone, Default, Serialize)]
#[non_exhaustive]
pub struct LoadLicenseRequest {
pub payloads: Vec<String>,
}
impl LoadLicenseRequest {
pub fn new(payloads: Vec<String>) -> Self {
Self {
payloads,
}
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct ResolveAlertResponse {
#[serde(rename = "alertId")]
pub alert_id: String,
}
#[derive(Debug, Clone, Default)]
#[non_exhaustive]
pub struct AlertListOptions {
pub active: Option<bool>,
pub account_id: Option<i64>,
pub region_id: Option<i64>,
pub severity: Option<i64>,
pub category: Option<String>,
pub since: Option<String>,
pub page: Option<i64>,
pub limit: Option<i64>,
}
impl AlertListOptions {
pub fn with_active(mut self, value: bool) -> Self {
self.active = Some(value);
self
}
pub fn with_account_id(mut self, value: i64) -> Self {
self.account_id = Some(value);
self
}
pub fn with_region_id(mut self, value: i64) -> Self {
self.region_id = Some(value);
self
}
pub fn with_severity(mut self, value: i64) -> Self {
self.severity = Some(value);
self
}
pub fn with_category(mut self, value: impl Into<String>) -> Self {
self.category = Some(value.into());
self
}
pub fn with_since(mut self, value: impl Into<String>) -> Self {
self.since = Some(value.into());
self
}
pub fn with_page(mut self, value: i64) -> Self {
self.page = Some(value);
self
}
pub fn with_limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct ResolveRegionAlertResponse {
#[serde(rename = "alertId")]
pub alert_id: String,
}
#[derive(Debug, Clone, Default)]
#[non_exhaustive]
pub struct RegionAlertListOptions {
pub active: Option<bool>,
pub severity: Option<i64>,
pub category: Option<String>,
pub node_id: Option<String>,
pub metadata_cluster_id: Option<i64>,
pub since: Option<String>,
pub page: Option<i64>,
pub limit: Option<i64>,
}
impl RegionAlertListOptions {
pub fn with_active(mut self, value: bool) -> Self {
self.active = Some(value);
self
}
pub fn with_severity(mut self, value: i64) -> Self {
self.severity = Some(value);
self
}
pub fn with_category(mut self, value: impl Into<String>) -> Self {
self.category = Some(value.into());
self
}
pub fn with_node_id(mut self, value: impl Into<String>) -> Self {
self.node_id = Some(value.into());
self
}
pub fn with_metadata_cluster_id(mut self, value: i64) -> Self {
self.metadata_cluster_id = Some(value);
self
}
pub fn with_since(mut self, value: impl Into<String>) -> Self {
self.since = Some(value.into());
self
}
pub fn with_page(mut self, value: i64) -> Self {
self.page = Some(value);
self
}
pub fn with_limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
}
#[derive(Debug, Clone, Default)]
#[non_exhaustive]
pub struct GCWorkerEventListOptions {
pub node_id: Option<String>,
pub goal: Option<String>,
pub sid: Option<i64>,
pub metadata_cluster_id: Option<i64>,
pub since: Option<String>,
pub page: Option<i64>,
pub limit: Option<i64>,
}
impl GCWorkerEventListOptions {
pub fn with_node_id(mut self, value: impl Into<String>) -> Self {
self.node_id = Some(value.into());
self
}
pub fn with_goal(mut self, value: impl Into<String>) -> Self {
self.goal = Some(value.into());
self
}
pub fn with_sid(mut self, value: i64) -> Self {
self.sid = Some(value);
self
}
pub fn with_metadata_cluster_id(mut self, value: i64) -> Self {
self.metadata_cluster_id = Some(value);
self
}
pub fn with_since(mut self, value: impl Into<String>) -> Self {
self.since = Some(value.into());
self
}
pub fn with_page(mut self, value: i64) -> Self {
self.page = Some(value);
self
}
pub fn with_limit(mut self, value: i64) -> Self {
self.limit = Some(value);
self
}
}