#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateHubInput {
#[doc(hidden)]
pub hub_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub hub_description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub hub_display_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub hub_search_keywords: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl UpdateHubInput {
pub fn hub_name(&self) -> std::option::Option<&str> {
self.hub_name.as_deref()
}
pub fn hub_description(&self) -> std::option::Option<&str> {
self.hub_description.as_deref()
}
pub fn hub_display_name(&self) -> std::option::Option<&str> {
self.hub_display_name.as_deref()
}
pub fn hub_search_keywords(&self) -> std::option::Option<&[std::string::String]> {
self.hub_search_keywords.as_deref()
}
}
impl UpdateHubInput {
pub fn builder() -> crate::operation::update_hub::builders::UpdateHubInputBuilder {
crate::operation::update_hub::builders::UpdateHubInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct UpdateHubInputBuilder {
pub(crate) hub_name: std::option::Option<std::string::String>,
pub(crate) hub_description: std::option::Option<std::string::String>,
pub(crate) hub_display_name: std::option::Option<std::string::String>,
pub(crate) hub_search_keywords: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl UpdateHubInputBuilder {
pub fn hub_name(mut self, input: impl Into<std::string::String>) -> Self {
self.hub_name = Some(input.into());
self
}
pub fn set_hub_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.hub_name = input;
self
}
pub fn hub_description(mut self, input: impl Into<std::string::String>) -> Self {
self.hub_description = Some(input.into());
self
}
pub fn set_hub_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.hub_description = input;
self
}
pub fn hub_display_name(mut self, input: impl Into<std::string::String>) -> Self {
self.hub_display_name = Some(input.into());
self
}
pub fn set_hub_display_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.hub_display_name = input;
self
}
pub fn hub_search_keywords(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.hub_search_keywords.unwrap_or_default();
v.push(input.into());
self.hub_search_keywords = Some(v);
self
}
pub fn set_hub_search_keywords(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.hub_search_keywords = input;
self
}
pub fn build(
self,
) -> Result<
crate::operation::update_hub::UpdateHubInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::operation::update_hub::UpdateHubInput {
hub_name: self.hub_name,
hub_description: self.hub_description,
hub_display_name: self.hub_display_name,
hub_search_keywords: self.hub_search_keywords,
})
}
}