use serde::{Deserialize, Serialize};
#[allow(unused_imports)]
use super::*;
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct UpdateThirdPartySoftwareSourceDetails {
pub software_source_type: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub gpg_key_url: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub is_gpg_check_enabled: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub is_ssl_verify_enabled: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub advanced_repo_options: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub is_mirror_sync_allowed: Option<bool>,
}
pub struct UpdateThirdPartySoftwareSourceDetailsRequired {
pub software_source_type: String,
}
impl UpdateThirdPartySoftwareSourceDetails {
pub fn new(required: UpdateThirdPartySoftwareSourceDetailsRequired) -> Self {
Self {
software_source_type: required.software_source_type,
url: None,
gpg_key_url: None,
is_gpg_check_enabled: None,
is_ssl_verify_enabled: None,
advanced_repo_options: None,
is_mirror_sync_allowed: None,
}
}
pub fn set_url(mut self, value: Option<String>) -> Self {
self.url = value;
self
}
pub fn set_gpg_key_url(mut self, value: Option<String>) -> Self {
self.gpg_key_url = value;
self
}
pub fn set_is_gpg_check_enabled(mut self, value: Option<bool>) -> Self {
self.is_gpg_check_enabled = value;
self
}
pub fn set_is_ssl_verify_enabled(mut self, value: Option<bool>) -> Self {
self.is_ssl_verify_enabled = value;
self
}
pub fn set_advanced_repo_options(mut self, value: Option<String>) -> Self {
self.advanced_repo_options = value;
self
}
pub fn set_is_mirror_sync_allowed(mut self, value: Option<bool>) -> Self {
self.is_mirror_sync_allowed = value;
self
}
pub fn set_software_source_type(mut self, value: String) -> Self {
self.software_source_type = value;
self
}
pub fn with_url(mut self, value: impl Into<String>) -> Self {
self.url = Some(value.into());
self
}
pub fn with_gpg_key_url(mut self, value: impl Into<String>) -> Self {
self.gpg_key_url = Some(value.into());
self
}
pub fn with_is_gpg_check_enabled(mut self, value: bool) -> Self {
self.is_gpg_check_enabled = Some(value);
self
}
pub fn with_is_ssl_verify_enabled(mut self, value: bool) -> Self {
self.is_ssl_verify_enabled = Some(value);
self
}
pub fn with_advanced_repo_options(mut self, value: impl Into<String>) -> Self {
self.advanced_repo_options = Some(value.into());
self
}
pub fn with_is_mirror_sync_allowed(mut self, value: bool) -> Self {
self.is_mirror_sync_allowed = Some(value);
self
}
}