#[non_exhaustive]pub struct Instance {Show 19 fields
pub name: String,
pub id: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub machine_type: String,
pub state: State,
pub hyperthreading_enabled: bool,
pub labels: HashMap<String, String>,
pub luns: Vec<Lun>,
pub volumes: Vec<Volume>,
pub networks: Vec<Network>,
pub interactive_serial_console_enabled: bool,
pub os_image: String,
pub pod: String,
pub network_template: String,
pub logical_interfaces: Vec<LogicalInterface>,
pub login_info: String,
pub workload_profile: WorkloadProfile,
pub firmware_version: String,
/* private fields */
}Expand description
A server.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringImmutable. The resource name of this Instance.
Resource names are schemeless URIs that follow the conventions in
https://cloud.google.com/apis/design/resource_names.
Format:
projects/{project}/locations/{location}/instances/{instance}
id: StringOutput only. An identifier for the Instance, generated by the backend.
create_time: Option<Timestamp>Output only. Create a time stamp.
update_time: Option<Timestamp>Output only. Update a time stamp.
machine_type: StringImmutable. The server type. Available server types
state: StateOutput only. The state of the server.
hyperthreading_enabled: boolTrue if you enable hyperthreading for the server, otherwise false. The default value is false.
labels: HashMap<String, String>Labels as key value pairs.
luns: Vec<Lun>Immutable. List of LUNs associated with this server.
volumes: Vec<Volume>Input only. List of Volumes to attach to this Instance on creation. This field won’t be populated in Get/List responses.
networks: Vec<Network>Output only. List of networks associated with this server.
interactive_serial_console_enabled: boolOutput only. True if the interactive serial console feature is enabled for the instance, false otherwise. The default value is false.
os_image: StringThe OS image currently installed on the server.
pod: StringImmutable. Pod name. Pod is an independent part of infrastructure. Instance can be connected to the assets (networks, volumes) allocated in the same pod only.
network_template: StringInstance network template name. For eg, bondaa-bondaa, bondab-nic, etc. Generally, the template name follows the syntax of “bond<bond_mode>” or “nic”.
logical_interfaces: Vec<LogicalInterface>List of logical interfaces for the instance. The number of logical interfaces will be the same as number of hardware bond/nic on the chosen network template. For the non-multivlan configurations (for eg, existing servers) that use existing default network template (bondaa-bondaa), both the Instance.networks field and the Instance.logical_interfaces fields will be filled to ensure backward compatibility. For the others, only Instance.logical_interfaces will be filled.
login_info: StringOutput only. Text field about info for logging in.
workload_profile: WorkloadProfileThe workload profile for the instance.
firmware_version: StringOutput only. The firmware version for the instance.
Implementations§
Source§impl Instance
impl Instance
pub fn new() -> Self
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
use wkt::Timestamp;
let x = Instance::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
use wkt::Timestamp;
let x = Instance::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Instance::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
§Example
use wkt::Timestamp;
let x = Instance::new().set_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
§Example
use wkt::Timestamp;
let x = Instance::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = Instance::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_machine_type<T: Into<String>>(self, v: T) -> Self
pub fn set_machine_type<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_hyperthreading_enabled<T: Into<bool>>(self, v: T) -> Self
pub fn set_hyperthreading_enabled<T: Into<bool>>(self, v: T) -> Self
Sets the value of hyperthreading_enabled.
§Example
let x = Instance::new().set_hyperthreading_enabled(true);Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sourcepub fn set_volumes<T, V>(self, v: T) -> Self
pub fn set_volumes<T, V>(self, v: T) -> Self
Sourcepub fn set_networks<T, V>(self, v: T) -> Self
pub fn set_networks<T, V>(self, v: T) -> Self
Sourcepub fn set_interactive_serial_console_enabled<T: Into<bool>>(self, v: T) -> Self
pub fn set_interactive_serial_console_enabled<T: Into<bool>>(self, v: T) -> Self
Sets the value of interactive_serial_console_enabled.
§Example
let x = Instance::new().set_interactive_serial_console_enabled(true);Sourcepub fn set_os_image<T: Into<String>>(self, v: T) -> Self
pub fn set_os_image<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_network_template<T: Into<String>>(self, v: T) -> Self
pub fn set_network_template<T: Into<String>>(self, v: T) -> Self
Sets the value of network_template.
§Example
let x = Instance::new().set_network_template("example");Sourcepub fn set_logical_interfaces<T, V>(self, v: T) -> Self
pub fn set_logical_interfaces<T, V>(self, v: T) -> Self
Sets the value of logical_interfaces.
§Example
use google_cloud_baremetalsolution_v2::model::LogicalInterface;
let x = Instance::new()
.set_logical_interfaces([
LogicalInterface::default()/* use setters */,
LogicalInterface::default()/* use (different) setters */,
]);Sourcepub fn set_login_info<T: Into<String>>(self, v: T) -> Self
pub fn set_login_info<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_workload_profile<T: Into<WorkloadProfile>>(self, v: T) -> Self
pub fn set_workload_profile<T: Into<WorkloadProfile>>(self, v: T) -> Self
Sets the value of workload_profile.
§Example
use google_cloud_baremetalsolution_v2::model::WorkloadProfile;
let x0 = Instance::new().set_workload_profile(WorkloadProfile::Generic);
let x1 = Instance::new().set_workload_profile(WorkloadProfile::Hana);Sourcepub fn set_firmware_version<T: Into<String>>(self, v: T) -> Self
pub fn set_firmware_version<T: Into<String>>(self, v: T) -> Self
Sets the value of firmware_version.
§Example
let x = Instance::new().set_firmware_version("example");