use serde::{Deserialize, Serialize};
#[allow(unused_imports)]
use super::*;
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ManagedInstanceSummary {
pub id: String,
pub display_name: String,
pub tenancy_id: String,
pub compartment_id: String,
pub status: ManagedInstanceStatus,
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub location: Option<ManagedInstanceLocation>,
#[serde(skip_serializing_if = "Option::is_none")]
pub architecture: Option<ArchType>,
#[serde(skip_serializing_if = "Option::is_none")]
pub os_family: Option<OsFamily>,
#[serde(skip_serializing_if = "Option::is_none")]
pub managed_instance_group: Option<Id>,
#[serde(skip_serializing_if = "Option::is_none")]
pub lifecycle_environment: Option<Id>,
#[serde(skip_serializing_if = "Option::is_none")]
pub lifecycle_stage: Option<Id>,
#[serde(skip_serializing_if = "Option::is_none")]
pub is_reboot_required: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub updates_available: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub is_management_station: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub notification_topic_id: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub autonomous_settings: Option<AutonomousSettings>,
#[serde(skip_serializing_if = "Option::is_none")]
pub is_managed_by_autonomous_linux: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub agent_version: Option<String>,
}
pub struct ManagedInstanceSummaryRequired {
pub id: String,
pub display_name: String,
pub tenancy_id: String,
pub compartment_id: String,
pub status: ManagedInstanceStatus,
}
impl ManagedInstanceSummary {
pub fn new(required: ManagedInstanceSummaryRequired) -> Self {
Self {
id: required.id,
display_name: required.display_name,
tenancy_id: required.tenancy_id,
compartment_id: required.compartment_id,
status: required.status,
description: None,
location: None,
architecture: None,
os_family: None,
managed_instance_group: None,
lifecycle_environment: None,
lifecycle_stage: None,
is_reboot_required: None,
updates_available: None,
is_management_station: None,
notification_topic_id: None,
autonomous_settings: None,
is_managed_by_autonomous_linux: None,
agent_version: None,
}
}
pub fn set_id(mut self, value: String) -> Self {
self.id = value;
self
}
pub fn set_display_name(mut self, value: String) -> Self {
self.display_name = value;
self
}
pub fn set_description(mut self, value: Option<String>) -> Self {
self.description = value;
self
}
pub fn set_tenancy_id(mut self, value: String) -> Self {
self.tenancy_id = value;
self
}
pub fn set_compartment_id(mut self, value: String) -> Self {
self.compartment_id = value;
self
}
pub fn set_location(mut self, value: Option<ManagedInstanceLocation>) -> Self {
self.location = value;
self
}
pub fn set_architecture(mut self, value: Option<ArchType>) -> Self {
self.architecture = value;
self
}
pub fn set_os_family(mut self, value: Option<OsFamily>) -> Self {
self.os_family = value;
self
}
pub fn set_status(mut self, value: ManagedInstanceStatus) -> Self {
self.status = value;
self
}
pub fn set_managed_instance_group(mut self, value: Option<Id>) -> Self {
self.managed_instance_group = value;
self
}
pub fn set_lifecycle_environment(mut self, value: Option<Id>) -> Self {
self.lifecycle_environment = value;
self
}
pub fn set_lifecycle_stage(mut self, value: Option<Id>) -> Self {
self.lifecycle_stage = value;
self
}
pub fn set_is_reboot_required(mut self, value: Option<bool>) -> Self {
self.is_reboot_required = value;
self
}
pub fn set_updates_available(mut self, value: Option<i64>) -> Self {
self.updates_available = value;
self
}
pub fn set_is_management_station(mut self, value: Option<bool>) -> Self {
self.is_management_station = value;
self
}
pub fn set_notification_topic_id(mut self, value: Option<String>) -> Self {
self.notification_topic_id = value;
self
}
pub fn set_autonomous_settings(mut self, value: Option<AutonomousSettings>) -> Self {
self.autonomous_settings = value;
self
}
pub fn set_is_managed_by_autonomous_linux(mut self, value: Option<bool>) -> Self {
self.is_managed_by_autonomous_linux = value;
self
}
pub fn set_agent_version(mut self, value: Option<String>) -> Self {
self.agent_version = value;
self
}
pub fn with_description(mut self, value: impl Into<String>) -> Self {
self.description = Some(value.into());
self
}
pub fn with_location(mut self, value: ManagedInstanceLocation) -> Self {
self.location = Some(value);
self
}
pub fn with_architecture(mut self, value: ArchType) -> Self {
self.architecture = Some(value);
self
}
pub fn with_os_family(mut self, value: OsFamily) -> Self {
self.os_family = Some(value);
self
}
pub fn with_managed_instance_group(mut self, value: Id) -> Self {
self.managed_instance_group = Some(value);
self
}
pub fn with_lifecycle_environment(mut self, value: Id) -> Self {
self.lifecycle_environment = Some(value);
self
}
pub fn with_lifecycle_stage(mut self, value: Id) -> Self {
self.lifecycle_stage = Some(value);
self
}
pub fn with_is_reboot_required(mut self, value: bool) -> Self {
self.is_reboot_required = Some(value);
self
}
pub fn with_updates_available(mut self, value: i64) -> Self {
self.updates_available = Some(value);
self
}
pub fn with_is_management_station(mut self, value: bool) -> Self {
self.is_management_station = Some(value);
self
}
pub fn with_notification_topic_id(mut self, value: impl Into<String>) -> Self {
self.notification_topic_id = Some(value.into());
self
}
pub fn with_autonomous_settings(mut self, value: AutonomousSettings) -> Self {
self.autonomous_settings = Some(value);
self
}
pub fn with_is_managed_by_autonomous_linux(mut self, value: bool) -> Self {
self.is_managed_by_autonomous_linux = Some(value);
self
}
pub fn with_agent_version(mut self, value: impl Into<String>) -> Self {
self.agent_version = Some(value.into());
self
}
}