use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
#[allow(unused_imports)]
use super::*;
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ProfileVersion {
pub id: String,
pub compartment_id: String,
pub display_name: String,
pub vendor_name: VendorName,
pub os_family: OsFamily,
pub arch_type: ArchType,
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub 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<ManagedInstanceGroupDetails>,
#[serde(skip_serializing_if = "Option::is_none")]
pub lifecycle_environment: Option<LifecycleEnvironmentDetails>,
#[serde(skip_serializing_if = "Option::is_none")]
pub lifecycle_stage: Option<LifecycleStageDetails>,
#[serde(skip_serializing_if = "Option::is_none")]
pub profile_type: Option<ProfileType>,
#[serde(skip_serializing_if = "Option::is_none")]
pub time_created: Option<DateTime<Utc>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub time_modified: Option<DateTime<Utc>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub profile_version: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub lifecycle_state: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub registration_type: Option<ProfileVersionRegistrationType>,
#[serde(skip_serializing_if = "Option::is_none")]
pub is_default_profile: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub is_service_provided_profile: Option<bool>,
}
pub struct ProfileVersionRequired {
pub id: String,
pub compartment_id: String,
pub display_name: String,
pub vendor_name: VendorName,
pub os_family: OsFamily,
pub arch_type: ArchType,
}
impl ProfileVersion {
pub fn new(required: ProfileVersionRequired) -> Self {
Self {
id: required.id,
compartment_id: required.compartment_id,
display_name: required.display_name,
vendor_name: required.vendor_name,
os_family: required.os_family,
arch_type: required.arch_type,
description: None,
management_station_id: None,
software_sources: None,
managed_instance_group: None,
lifecycle_environment: None,
lifecycle_stage: None,
profile_type: None,
time_created: None,
time_modified: None,
profile_version: None,
lifecycle_state: None,
registration_type: None,
is_default_profile: None,
is_service_provided_profile: None,
}
}
pub fn set_id(mut self, value: String) -> Self {
self.id = value;
self
}
pub fn set_compartment_id(mut self, value: String) -> Self {
self.compartment_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_management_station_id(mut self, value: Option<String>) -> Self {
self.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<ManagedInstanceGroupDetails>,
) -> Self {
self.managed_instance_group = value;
self
}
pub fn set_lifecycle_environment(mut self, value: Option<LifecycleEnvironmentDetails>) -> Self {
self.lifecycle_environment = value;
self
}
pub fn set_lifecycle_stage(mut self, value: Option<LifecycleStageDetails>) -> Self {
self.lifecycle_stage = value;
self
}
pub fn set_profile_type(mut self, value: Option<ProfileType>) -> Self {
self.profile_type = value;
self
}
pub fn set_vendor_name(mut self, value: VendorName) -> Self {
self.vendor_name = value;
self
}
pub fn set_os_family(mut self, value: OsFamily) -> Self {
self.os_family = value;
self
}
pub fn set_arch_type(mut self, value: ArchType) -> Self {
self.arch_type = value;
self
}
pub fn set_time_created(mut self, value: Option<DateTime<Utc>>) -> Self {
self.time_created = value;
self
}
pub fn set_time_modified(mut self, value: Option<DateTime<Utc>>) -> Self {
self.time_modified = value;
self
}
pub fn set_profile_version(mut self, value: Option<String>) -> Self {
self.profile_version = value;
self
}
pub fn set_lifecycle_state(mut self, value: Option<String>) -> Self {
self.lifecycle_state = value;
self
}
pub fn set_registration_type(mut self, value: Option<ProfileVersionRegistrationType>) -> Self {
self.registration_type = value;
self
}
pub fn set_is_default_profile(mut self, value: Option<bool>) -> Self {
self.is_default_profile = value;
self
}
pub fn set_is_service_provided_profile(mut self, value: Option<bool>) -> Self {
self.is_service_provided_profile = value;
self
}
pub fn with_description(mut self, value: impl Into<String>) -> Self {
self.description = Some(value.into());
self
}
pub fn with_management_station_id(mut self, value: impl Into<String>) -> Self {
self.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: ManagedInstanceGroupDetails) -> Self {
self.managed_instance_group = Some(value);
self
}
pub fn with_lifecycle_environment(mut self, value: LifecycleEnvironmentDetails) -> Self {
self.lifecycle_environment = Some(value);
self
}
pub fn with_lifecycle_stage(mut self, value: LifecycleStageDetails) -> Self {
self.lifecycle_stage = Some(value);
self
}
pub fn with_profile_type(mut self, value: ProfileType) -> Self {
self.profile_type = Some(value);
self
}
pub fn with_time_created(mut self, value: DateTime<Utc>) -> Self {
self.time_created = Some(value);
self
}
pub fn with_time_modified(mut self, value: DateTime<Utc>) -> Self {
self.time_modified = Some(value);
self
}
pub fn with_profile_version(mut self, value: impl Into<String>) -> Self {
self.profile_version = Some(value.into());
self
}
pub fn with_lifecycle_state(mut self, value: impl Into<String>) -> Self {
self.lifecycle_state = Some(value.into());
self
}
pub fn with_registration_type(mut self, value: ProfileVersionRegistrationType) -> Self {
self.registration_type = Some(value);
self
}
pub fn with_is_default_profile(mut self, value: bool) -> Self {
self.is_default_profile = Some(value);
self
}
pub fn with_is_service_provided_profile(mut self, value: bool) -> Self {
self.is_service_provided_profile = Some(value);
self
}
}