#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateHubInput {
pub hub_name: ::std::option::Option<::std::string::String>,
pub hub_description: ::std::option::Option<::std::string::String>,
pub hub_display_name: ::std::option::Option<::std::string::String>,
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::string::String] {
self.hub_search_keywords.as_deref().unwrap_or_default()
}
}
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 ::std::convert::Into<::std::string::String>) -> Self {
self.hub_name = ::std::option::Option::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 get_hub_name(&self) -> &::std::option::Option<::std::string::String> {
&self.hub_name
}
pub fn hub_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.hub_description = ::std::option::Option::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 get_hub_description(&self) -> &::std::option::Option<::std::string::String> {
&self.hub_description
}
pub fn hub_display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.hub_display_name = ::std::option::Option::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 get_hub_display_name(&self) -> &::std::option::Option<::std::string::String> {
&self.hub_display_name
}
pub fn hub_search_keywords(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.hub_search_keywords.unwrap_or_default();
v.push(input.into());
self.hub_search_keywords = ::std::option::Option::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 get_hub_search_keywords(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.hub_search_keywords
}
pub fn build(self) -> ::std::result::Result<crate::operation::update_hub::UpdateHubInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::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,
})
}
}