use serde::{Deserialize, Serialize};
#[allow(unused_imports)]
use super::*;
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct SearchSoftwareSourceModulesDetails {
pub software_source_ids: Vec<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub sort_order: Option<SearchSoftwareSourceModulesDetailsSortOrder>,
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub name_contains: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub sort_by: Option<SearchSoftwareSourceModulesDetailsSortBy>,
}
pub struct SearchSoftwareSourceModulesDetailsRequired {
pub software_source_ids: Vec<String>,
}
impl SearchSoftwareSourceModulesDetails {
pub fn new(required: SearchSoftwareSourceModulesDetailsRequired) -> Self {
Self {
software_source_ids: required.software_source_ids,
sort_order: None,
name: None,
name_contains: None,
sort_by: None,
}
}
pub fn set_software_source_ids(mut self, value: Vec<String>) -> Self {
self.software_source_ids = value;
self
}
pub fn set_sort_order(
mut self,
value: Option<SearchSoftwareSourceModulesDetailsSortOrder>,
) -> Self {
self.sort_order = value;
self
}
pub fn set_name(mut self, value: Option<String>) -> Self {
self.name = value;
self
}
pub fn set_name_contains(mut self, value: Option<String>) -> Self {
self.name_contains = value;
self
}
pub fn set_sort_by(mut self, value: Option<SearchSoftwareSourceModulesDetailsSortBy>) -> Self {
self.sort_by = value;
self
}
pub fn with_sort_order(mut self, value: SearchSoftwareSourceModulesDetailsSortOrder) -> Self {
self.sort_order = Some(value);
self
}
pub fn with_name(mut self, value: impl Into<String>) -> Self {
self.name = Some(value.into());
self
}
pub fn with_name_contains(mut self, value: impl Into<String>) -> Self {
self.name_contains = Some(value.into());
self
}
pub fn with_sort_by(mut self, value: SearchSoftwareSourceModulesDetailsSortBy) -> Self {
self.sort_by = Some(value);
self
}
}