Skip to main content

oci_rust_sdk/core/models/
capacity_source.rs

1use serde::{Deserialize, Serialize};
2
3#[allow(unused_imports)]
4use super::*;
5/// A capacity source of bare metal hosts.
6#[derive(Debug, Clone, Serialize, Deserialize)]
7#[serde(rename_all = "camelCase")]
8pub struct CapacitySource {
9    pub capacity_type: String,
10}
11
12/// Required fields for CapacitySource
13pub struct CapacitySourceRequired {
14    pub capacity_type: String,
15}
16
17impl CapacitySource {
18    /// Create a new CapacitySource with required fields
19    pub fn new(required: CapacitySourceRequired) -> Self {
20        Self {
21            capacity_type: required.capacity_type,
22        }
23    }
24
25    /// Set capacity_type
26    pub fn set_capacity_type(mut self, value: String) -> Self {
27        self.capacity_type = value;
28        self
29    }
30}