use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
#[allow(unused_imports)]
use super::*;
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ManagedInstance {
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 time_last_checkin: Option<DateTime<Utc>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub time_last_boot: Option<DateTime<Utc>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub os_name: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub os_version: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub os_kernel_version: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub ksplice_effective_kernel_version: Option<String>,
#[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 profile: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub profile_version: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub is_management_station: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub primary_management_station_id: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub secondary_management_station_id: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub software_sources: Option<Vec<SoftwareSourceDetails>>,
#[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 installed_packages: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub installed_windows_updates: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub updates_available: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub security_updates_available: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub bug_updates_available: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub enhancement_updates_available: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub other_updates_available: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub scheduled_job_count: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub work_request_count: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub time_created: Option<DateTime<Utc>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub time_updated: Option<DateTime<Utc>>,
#[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 ManagedInstanceRequired {
pub id: String,
pub display_name: String,
pub tenancy_id: String,
pub compartment_id: String,
pub status: ManagedInstanceStatus,
}
impl ManagedInstance {
pub fn new(required: ManagedInstanceRequired) -> 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,
time_last_checkin: None,
time_last_boot: None,
os_name: None,
os_version: None,
os_kernel_version: None,
ksplice_effective_kernel_version: None,
architecture: None,
os_family: None,
profile: None,
profile_version: None,
is_management_station: None,
primary_management_station_id: None,
secondary_management_station_id: None,
software_sources: None,
managed_instance_group: None,
lifecycle_environment: None,
lifecycle_stage: None,
is_reboot_required: None,
installed_packages: None,
installed_windows_updates: None,
updates_available: None,
security_updates_available: None,
bug_updates_available: None,
enhancement_updates_available: None,
other_updates_available: None,
scheduled_job_count: None,
work_request_count: None,
time_created: None,
time_updated: 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_time_last_checkin(mut self, value: Option<DateTime<Utc>>) -> Self {
self.time_last_checkin = value;
self
}
pub fn set_time_last_boot(mut self, value: Option<DateTime<Utc>>) -> Self {
self.time_last_boot = value;
self
}
pub fn set_os_name(mut self, value: Option<String>) -> Self {
self.os_name = value;
self
}
pub fn set_os_version(mut self, value: Option<String>) -> Self {
self.os_version = value;
self
}
pub fn set_os_kernel_version(mut self, value: Option<String>) -> Self {
self.os_kernel_version = value;
self
}
pub fn set_ksplice_effective_kernel_version(mut self, value: Option<String>) -> Self {
self.ksplice_effective_kernel_version = 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_profile(mut self, value: Option<String>) -> Self {
self.profile = value;
self
}
pub fn set_profile_version(mut self, value: Option<String>) -> Self {
self.profile_version = value;
self
}
pub fn set_is_management_station(mut self, value: Option<bool>) -> Self {
self.is_management_station = value;
self
}
pub fn set_primary_management_station_id(mut self, value: Option<String>) -> Self {
self.primary_management_station_id = value;
self
}
pub fn set_secondary_management_station_id(mut self, value: Option<String>) -> Self {
self.secondary_management_station_id = value;
self
}
pub fn set_software_sources(mut self, value: Option<Vec<SoftwareSourceDetails>>) -> Self {
self.software_sources = 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_installed_packages(mut self, value: Option<i64>) -> Self {
self.installed_packages = value;
self
}
pub fn set_installed_windows_updates(mut self, value: Option<i64>) -> Self {
self.installed_windows_updates = value;
self
}
pub fn set_updates_available(mut self, value: Option<i64>) -> Self {
self.updates_available = value;
self
}
pub fn set_security_updates_available(mut self, value: Option<i64>) -> Self {
self.security_updates_available = value;
self
}
pub fn set_bug_updates_available(mut self, value: Option<i64>) -> Self {
self.bug_updates_available = value;
self
}
pub fn set_enhancement_updates_available(mut self, value: Option<i64>) -> Self {
self.enhancement_updates_available = value;
self
}
pub fn set_other_updates_available(mut self, value: Option<i64>) -> Self {
self.other_updates_available = value;
self
}
pub fn set_scheduled_job_count(mut self, value: Option<i64>) -> Self {
self.scheduled_job_count = value;
self
}
pub fn set_work_request_count(mut self, value: Option<i64>) -> Self {
self.work_request_count = value;
self
}
pub fn set_time_created(mut self, value: Option<DateTime<Utc>>) -> Self {
self.time_created = value;
self
}
pub fn set_time_updated(mut self, value: Option<DateTime<Utc>>) -> Self {
self.time_updated = 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_time_last_checkin(mut self, value: DateTime<Utc>) -> Self {
self.time_last_checkin = Some(value);
self
}
pub fn with_time_last_boot(mut self, value: DateTime<Utc>) -> Self {
self.time_last_boot = Some(value);
self
}
pub fn with_os_name(mut self, value: impl Into<String>) -> Self {
self.os_name = Some(value.into());
self
}
pub fn with_os_version(mut self, value: impl Into<String>) -> Self {
self.os_version = Some(value.into());
self
}
pub fn with_os_kernel_version(mut self, value: impl Into<String>) -> Self {
self.os_kernel_version = Some(value.into());
self
}
pub fn with_ksplice_effective_kernel_version(mut self, value: impl Into<String>) -> Self {
self.ksplice_effective_kernel_version = Some(value.into());
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_profile(mut self, value: impl Into<String>) -> Self {
self.profile = Some(value.into());
self
}
pub fn with_profile_version(mut self, value: impl Into<String>) -> Self {
self.profile_version = Some(value.into());
self
}
pub fn with_is_management_station(mut self, value: bool) -> Self {
self.is_management_station = Some(value);
self
}
pub fn with_primary_management_station_id(mut self, value: impl Into<String>) -> Self {
self.primary_management_station_id = Some(value.into());
self
}
pub fn with_secondary_management_station_id(mut self, value: impl Into<String>) -> Self {
self.secondary_management_station_id = Some(value.into());
self
}
pub fn with_software_sources(mut self, value: Vec<SoftwareSourceDetails>) -> Self {
self.software_sources = 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_installed_packages(mut self, value: i64) -> Self {
self.installed_packages = Some(value);
self
}
pub fn with_installed_windows_updates(mut self, value: i64) -> Self {
self.installed_windows_updates = Some(value);
self
}
pub fn with_updates_available(mut self, value: i64) -> Self {
self.updates_available = Some(value);
self
}
pub fn with_security_updates_available(mut self, value: i64) -> Self {
self.security_updates_available = Some(value);
self
}
pub fn with_bug_updates_available(mut self, value: i64) -> Self {
self.bug_updates_available = Some(value);
self
}
pub fn with_enhancement_updates_available(mut self, value: i64) -> Self {
self.enhancement_updates_available = Some(value);
self
}
pub fn with_other_updates_available(mut self, value: i64) -> Self {
self.other_updates_available = Some(value);
self
}
pub fn with_scheduled_job_count(mut self, value: i64) -> Self {
self.scheduled_job_count = Some(value);
self
}
pub fn with_work_request_count(mut self, value: i64) -> Self {
self.work_request_count = Some(value);
self
}
pub fn with_time_created(mut self, value: DateTime<Utc>) -> Self {
self.time_created = Some(value);
self
}
pub fn with_time_updated(mut self, value: DateTime<Utc>) -> Self {
self.time_updated = 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
}
}