use serde::{Deserialize, Serialize};
use std::collections::HashMap;
#[allow(unused_imports)]
use super::*;
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct UpdateSoftwareSourceDetails {
pub software_source_type: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub compartment_id: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub freeform_tags: Option<HashMap<String, String>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub defined_tags: Option<HashMap<String, HashMap<String, serde_json::Value>>>,
}
pub struct UpdateSoftwareSourceDetailsRequired {
pub software_source_type: String,
}
impl UpdateSoftwareSourceDetails {
pub fn new(required: UpdateSoftwareSourceDetailsRequired) -> Self {
Self {
software_source_type: required.software_source_type,
compartment_id: None,
display_name: None,
description: None,
freeform_tags: None,
defined_tags: None,
}
}
pub fn set_compartment_id(mut self, value: Option<String>) -> Self {
self.compartment_id = value;
self
}
pub fn set_display_name(mut self, value: Option<String>) -> Self {
self.display_name = value;
self
}
pub fn set_description(mut self, value: Option<String>) -> Self {
self.description = value;
self
}
pub fn set_freeform_tags(mut self, value: Option<HashMap<String, String>>) -> Self {
self.freeform_tags = value;
self
}
pub fn set_defined_tags(
mut self,
value: Option<HashMap<String, HashMap<String, serde_json::Value>>>,
) -> Self {
self.defined_tags = value;
self
}
pub fn set_software_source_type(mut self, value: String) -> Self {
self.software_source_type = value;
self
}
pub fn with_compartment_id(mut self, value: impl Into<String>) -> Self {
self.compartment_id = Some(value.into());
self
}
pub fn with_display_name(mut self, value: impl Into<String>) -> Self {
self.display_name = Some(value.into());
self
}
pub fn with_description(mut self, value: impl Into<String>) -> Self {
self.description = Some(value.into());
self
}
pub fn with_freeform_tags(mut self, value: HashMap<String, String>) -> Self {
self.freeform_tags = Some(value);
self
}
pub fn with_defined_tags(
mut self,
value: HashMap<String, HashMap<String, serde_json::Value>>,
) -> Self {
self.defined_tags = Some(value);
self
}
}