oci_rust_sdk/core/models/
compute_instance_options.rs1use serde::{Deserialize, Serialize};
2
3#[allow(unused_imports)]
4use super::*;
5#[derive(Debug, Clone, Serialize, Deserialize)]
7#[serde(rename_all = "camelCase")]
8pub struct ComputeInstanceOptions {
9 pub instance_type: String,
10
11 #[serde(skip_serializing_if = "Option::is_none")]
13 pub options: Option<Vec<ComputeInstanceDetails>>,
14}
15
16pub struct ComputeInstanceOptionsRequired {
18 pub instance_type: String,
19}
20
21impl ComputeInstanceOptions {
22 pub fn new(required: ComputeInstanceOptionsRequired) -> Self {
24 Self {
25 instance_type: required.instance_type,
26
27 options: None,
28 }
29 }
30
31 pub fn set_options(mut self, value: Option<Vec<ComputeInstanceDetails>>) -> Self {
33 self.options = value;
34 self
35 }
36
37 pub fn set_instance_type(mut self, value: String) -> Self {
39 self.instance_type = value;
40 self
41 }
42
43 pub fn with_options(mut self, value: Vec<ComputeInstanceDetails>) -> Self {
45 self.options = Some(value);
46 self
47 }
48}