oci_rust_sdk/core/models/
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 InstanceOptions {
9 #[serde(skip_serializing_if = "Option::is_none")]
11 pub are_legacy_imds_endpoints_disabled: Option<bool>,
12}
13
14impl InstanceOptions {
15 pub fn new() -> Self {
17 Self {
18 are_legacy_imds_endpoints_disabled: None,
19 }
20 }
21
22 pub fn set_are_legacy_imds_endpoints_disabled(mut self, value: Option<bool>) -> Self {
24 self.are_legacy_imds_endpoints_disabled = value;
25 self
26 }
27
28 pub fn with_are_legacy_imds_endpoints_disabled(mut self, value: bool) -> Self {
30 self.are_legacy_imds_endpoints_disabled = Some(value);
31 self
32 }
33}
34
35impl Default for InstanceOptions {
36 fn default() -> Self {
37 Self::new()
38 }
39}