aws_sdk_sagemaker/operation/update_hub/
_update_hub_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateHubInput {
6    /// <p>The name of the hub to update.</p>
7    pub hub_name: ::std::option::Option<::std::string::String>,
8    /// <p>A description of the updated hub.</p>
9    pub hub_description: ::std::option::Option<::std::string::String>,
10    /// <p>The display name of the hub.</p>
11    pub hub_display_name: ::std::option::Option<::std::string::String>,
12    /// <p>The searchable keywords for the hub.</p>
13    pub hub_search_keywords: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
14}
15impl UpdateHubInput {
16    /// <p>The name of the hub to update.</p>
17    pub fn hub_name(&self) -> ::std::option::Option<&str> {
18        self.hub_name.as_deref()
19    }
20    /// <p>A description of the updated hub.</p>
21    pub fn hub_description(&self) -> ::std::option::Option<&str> {
22        self.hub_description.as_deref()
23    }
24    /// <p>The display name of the hub.</p>
25    pub fn hub_display_name(&self) -> ::std::option::Option<&str> {
26        self.hub_display_name.as_deref()
27    }
28    /// <p>The searchable keywords for the hub.</p>
29    ///
30    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.hub_search_keywords.is_none()`.
31    pub fn hub_search_keywords(&self) -> &[::std::string::String] {
32        self.hub_search_keywords.as_deref().unwrap_or_default()
33    }
34}
35impl UpdateHubInput {
36    /// Creates a new builder-style object to manufacture [`UpdateHubInput`](crate::operation::update_hub::UpdateHubInput).
37    pub fn builder() -> crate::operation::update_hub::builders::UpdateHubInputBuilder {
38        crate::operation::update_hub::builders::UpdateHubInputBuilder::default()
39    }
40}
41
42/// A builder for [`UpdateHubInput`](crate::operation::update_hub::UpdateHubInput).
43#[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    /// <p>The name of the hub to update.</p>
53    /// This field is required.
54    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    /// <p>The name of the hub to update.</p>
59    pub fn set_hub_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60        self.hub_name = input;
61        self
62    }
63    /// <p>The name of the hub to update.</p>
64    pub fn get_hub_name(&self) -> &::std::option::Option<::std::string::String> {
65        &self.hub_name
66    }
67    /// <p>A description of the updated hub.</p>
68    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    /// <p>A description of the updated hub.</p>
73    pub fn set_hub_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74        self.hub_description = input;
75        self
76    }
77    /// <p>A description of the updated hub.</p>
78    pub fn get_hub_description(&self) -> &::std::option::Option<::std::string::String> {
79        &self.hub_description
80    }
81    /// <p>The display name of the hub.</p>
82    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    /// <p>The display name of the hub.</p>
87    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    /// <p>The display name of the hub.</p>
92    pub fn get_hub_display_name(&self) -> &::std::option::Option<::std::string::String> {
93        &self.hub_display_name
94    }
95    /// Appends an item to `hub_search_keywords`.
96    ///
97    /// To override the contents of this collection use [`set_hub_search_keywords`](Self::set_hub_search_keywords).
98    ///
99    /// <p>The searchable keywords for the hub.</p>
100    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    /// <p>The searchable keywords for the hub.</p>
107    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    /// <p>The searchable keywords for the hub.</p>
112    pub fn get_hub_search_keywords(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
113        &self.hub_search_keywords
114    }
115    /// Consumes the builder and constructs a [`UpdateHubInput`](crate::operation::update_hub::UpdateHubInput).
116    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}