Skip to main content

oci_rust_sdk/core/models/
compute_cluster_collection.rs

1use serde::{Deserialize, Serialize};
2
3#[allow(unused_imports)]
4use super::*;
5/// A list of compute clusters that match filter criteria, if any. A [compute cluster](https://docs.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) is a remote direct memory access (RDMA) network group.
6#[derive(Debug, Clone, Serialize, Deserialize)]
7#[serde(rename_all = "camelCase")]
8pub struct ComputeClusterCollection {
9    /// The list of compute clusters.
10    pub items: Vec<ComputeClusterSummary>,
11}
12
13/// Required fields for ComputeClusterCollection
14pub struct ComputeClusterCollectionRequired {
15    /// The list of compute clusters.
16    pub items: Vec<ComputeClusterSummary>,
17}
18
19impl ComputeClusterCollection {
20    /// Create a new ComputeClusterCollection with required fields
21    pub fn new(required: ComputeClusterCollectionRequired) -> Self {
22        Self {
23            items: required.items,
24        }
25    }
26
27    /// Set items
28    pub fn set_items(mut self, value: Vec<ComputeClusterSummary>) -> Self {
29        self.items = value;
30        self
31    }
32}