aws_sdk_sagemaker/operation/update_hub/
_update_hub_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateHubInput {
6 pub hub_name: ::std::option::Option<::std::string::String>,
8 pub hub_description: ::std::option::Option<::std::string::String>,
10 pub hub_display_name: ::std::option::Option<::std::string::String>,
12 pub hub_search_keywords: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
14}
15impl UpdateHubInput {
16 pub fn hub_name(&self) -> ::std::option::Option<&str> {
18 self.hub_name.as_deref()
19 }
20 pub fn hub_description(&self) -> ::std::option::Option<&str> {
22 self.hub_description.as_deref()
23 }
24 pub fn hub_display_name(&self) -> ::std::option::Option<&str> {
26 self.hub_display_name.as_deref()
27 }
28 pub fn hub_search_keywords(&self) -> &[::std::string::String] {
32 self.hub_search_keywords.as_deref().unwrap_or_default()
33 }
34}
35impl UpdateHubInput {
36 pub fn builder() -> crate::operation::update_hub::builders::UpdateHubInputBuilder {
38 crate::operation::update_hub::builders::UpdateHubInputBuilder::default()
39 }
40}
41
42#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct UpdateHubInputBuilder {
46 pub(crate) hub_name: ::std::option::Option<::std::string::String>,
47 pub(crate) hub_description: ::std::option::Option<::std::string::String>,
48 pub(crate) hub_display_name: ::std::option::Option<::std::string::String>,
49 pub(crate) hub_search_keywords: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
50}
51impl UpdateHubInputBuilder {
52 pub fn hub_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55 self.hub_name = ::std::option::Option::Some(input.into());
56 self
57 }
58 pub fn set_hub_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60 self.hub_name = input;
61 self
62 }
63 pub fn get_hub_name(&self) -> &::std::option::Option<::std::string::String> {
65 &self.hub_name
66 }
67 pub fn hub_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
69 self.hub_description = ::std::option::Option::Some(input.into());
70 self
71 }
72 pub fn set_hub_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74 self.hub_description = input;
75 self
76 }
77 pub fn get_hub_description(&self) -> &::std::option::Option<::std::string::String> {
79 &self.hub_description
80 }
81 pub fn hub_display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83 self.hub_display_name = ::std::option::Option::Some(input.into());
84 self
85 }
86 pub fn set_hub_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88 self.hub_display_name = input;
89 self
90 }
91 pub fn get_hub_display_name(&self) -> &::std::option::Option<::std::string::String> {
93 &self.hub_display_name
94 }
95 pub fn hub_search_keywords(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
101 let mut v = self.hub_search_keywords.unwrap_or_default();
102 v.push(input.into());
103 self.hub_search_keywords = ::std::option::Option::Some(v);
104 self
105 }
106 pub fn set_hub_search_keywords(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
108 self.hub_search_keywords = input;
109 self
110 }
111 pub fn get_hub_search_keywords(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
113 &self.hub_search_keywords
114 }
115 pub fn build(self) -> ::std::result::Result<crate::operation::update_hub::UpdateHubInput, ::aws_smithy_types::error::operation::BuildError> {
117 ::std::result::Result::Ok(crate::operation::update_hub::UpdateHubInput {
118 hub_name: self.hub_name,
119 hub_description: self.hub_description,
120 hub_display_name: self.hub_display_name,
121 hub_search_keywords: self.hub_search_keywords,
122 })
123 }
124}