aws_sdk_sagemaker/operation/describe_hub/
_describe_hub_output.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 DescribeHubOutput {
6    /// <p>The name of the hub.</p>
7    pub hub_name: ::std::option::Option<::std::string::String>,
8    /// <p>The Amazon Resource Name (ARN) of the hub.</p>
9    pub hub_arn: ::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>A description of the hub.</p>
13    pub hub_description: ::std::option::Option<::std::string::String>,
14    /// <p>The searchable keywords for the hub.</p>
15    pub hub_search_keywords: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
16    /// <p>The Amazon S3 storage configuration for the hub.</p>
17    pub s3_storage_config: ::std::option::Option<crate::types::HubS3StorageConfig>,
18    /// <p>The status of the hub.</p>
19    pub hub_status: ::std::option::Option<crate::types::HubStatus>,
20    /// <p>The failure reason if importing hub content failed.</p>
21    pub failure_reason: ::std::option::Option<::std::string::String>,
22    /// <p>The date and time that the hub was created.</p>
23    pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
24    /// <p>The date and time that the hub was last modified.</p>
25    pub last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
26    _request_id: Option<String>,
27}
28impl DescribeHubOutput {
29    /// <p>The name of the hub.</p>
30    pub fn hub_name(&self) -> ::std::option::Option<&str> {
31        self.hub_name.as_deref()
32    }
33    /// <p>The Amazon Resource Name (ARN) of the hub.</p>
34    pub fn hub_arn(&self) -> ::std::option::Option<&str> {
35        self.hub_arn.as_deref()
36    }
37    /// <p>The display name of the hub.</p>
38    pub fn hub_display_name(&self) -> ::std::option::Option<&str> {
39        self.hub_display_name.as_deref()
40    }
41    /// <p>A description of the hub.</p>
42    pub fn hub_description(&self) -> ::std::option::Option<&str> {
43        self.hub_description.as_deref()
44    }
45    /// <p>The searchable keywords for the hub.</p>
46    ///
47    /// 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()`.
48    pub fn hub_search_keywords(&self) -> &[::std::string::String] {
49        self.hub_search_keywords.as_deref().unwrap_or_default()
50    }
51    /// <p>The Amazon S3 storage configuration for the hub.</p>
52    pub fn s3_storage_config(&self) -> ::std::option::Option<&crate::types::HubS3StorageConfig> {
53        self.s3_storage_config.as_ref()
54    }
55    /// <p>The status of the hub.</p>
56    pub fn hub_status(&self) -> ::std::option::Option<&crate::types::HubStatus> {
57        self.hub_status.as_ref()
58    }
59    /// <p>The failure reason if importing hub content failed.</p>
60    pub fn failure_reason(&self) -> ::std::option::Option<&str> {
61        self.failure_reason.as_deref()
62    }
63    /// <p>The date and time that the hub was created.</p>
64    pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
65        self.creation_time.as_ref()
66    }
67    /// <p>The date and time that the hub was last modified.</p>
68    pub fn last_modified_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
69        self.last_modified_time.as_ref()
70    }
71}
72impl ::aws_types::request_id::RequestId for DescribeHubOutput {
73    fn request_id(&self) -> Option<&str> {
74        self._request_id.as_deref()
75    }
76}
77impl DescribeHubOutput {
78    /// Creates a new builder-style object to manufacture [`DescribeHubOutput`](crate::operation::describe_hub::DescribeHubOutput).
79    pub fn builder() -> crate::operation::describe_hub::builders::DescribeHubOutputBuilder {
80        crate::operation::describe_hub::builders::DescribeHubOutputBuilder::default()
81    }
82}
83
84/// A builder for [`DescribeHubOutput`](crate::operation::describe_hub::DescribeHubOutput).
85#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
86#[non_exhaustive]
87pub struct DescribeHubOutputBuilder {
88    pub(crate) hub_name: ::std::option::Option<::std::string::String>,
89    pub(crate) hub_arn: ::std::option::Option<::std::string::String>,
90    pub(crate) hub_display_name: ::std::option::Option<::std::string::String>,
91    pub(crate) hub_description: ::std::option::Option<::std::string::String>,
92    pub(crate) hub_search_keywords: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
93    pub(crate) s3_storage_config: ::std::option::Option<crate::types::HubS3StorageConfig>,
94    pub(crate) hub_status: ::std::option::Option<crate::types::HubStatus>,
95    pub(crate) failure_reason: ::std::option::Option<::std::string::String>,
96    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
97    pub(crate) last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
98    _request_id: Option<String>,
99}
100impl DescribeHubOutputBuilder {
101    /// <p>The name of the hub.</p>
102    /// This field is required.
103    pub fn hub_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
104        self.hub_name = ::std::option::Option::Some(input.into());
105        self
106    }
107    /// <p>The name of the hub.</p>
108    pub fn set_hub_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
109        self.hub_name = input;
110        self
111    }
112    /// <p>The name of the hub.</p>
113    pub fn get_hub_name(&self) -> &::std::option::Option<::std::string::String> {
114        &self.hub_name
115    }
116    /// <p>The Amazon Resource Name (ARN) of the hub.</p>
117    /// This field is required.
118    pub fn hub_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
119        self.hub_arn = ::std::option::Option::Some(input.into());
120        self
121    }
122    /// <p>The Amazon Resource Name (ARN) of the hub.</p>
123    pub fn set_hub_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
124        self.hub_arn = input;
125        self
126    }
127    /// <p>The Amazon Resource Name (ARN) of the hub.</p>
128    pub fn get_hub_arn(&self) -> &::std::option::Option<::std::string::String> {
129        &self.hub_arn
130    }
131    /// <p>The display name of the hub.</p>
132    pub fn hub_display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
133        self.hub_display_name = ::std::option::Option::Some(input.into());
134        self
135    }
136    /// <p>The display name of the hub.</p>
137    pub fn set_hub_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
138        self.hub_display_name = input;
139        self
140    }
141    /// <p>The display name of the hub.</p>
142    pub fn get_hub_display_name(&self) -> &::std::option::Option<::std::string::String> {
143        &self.hub_display_name
144    }
145    /// <p>A description of the hub.</p>
146    pub fn hub_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
147        self.hub_description = ::std::option::Option::Some(input.into());
148        self
149    }
150    /// <p>A description of the hub.</p>
151    pub fn set_hub_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
152        self.hub_description = input;
153        self
154    }
155    /// <p>A description of the hub.</p>
156    pub fn get_hub_description(&self) -> &::std::option::Option<::std::string::String> {
157        &self.hub_description
158    }
159    /// Appends an item to `hub_search_keywords`.
160    ///
161    /// To override the contents of this collection use [`set_hub_search_keywords`](Self::set_hub_search_keywords).
162    ///
163    /// <p>The searchable keywords for the hub.</p>
164    pub fn hub_search_keywords(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
165        let mut v = self.hub_search_keywords.unwrap_or_default();
166        v.push(input.into());
167        self.hub_search_keywords = ::std::option::Option::Some(v);
168        self
169    }
170    /// <p>The searchable keywords for the hub.</p>
171    pub fn set_hub_search_keywords(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
172        self.hub_search_keywords = input;
173        self
174    }
175    /// <p>The searchable keywords for the hub.</p>
176    pub fn get_hub_search_keywords(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
177        &self.hub_search_keywords
178    }
179    /// <p>The Amazon S3 storage configuration for the hub.</p>
180    pub fn s3_storage_config(mut self, input: crate::types::HubS3StorageConfig) -> Self {
181        self.s3_storage_config = ::std::option::Option::Some(input);
182        self
183    }
184    /// <p>The Amazon S3 storage configuration for the hub.</p>
185    pub fn set_s3_storage_config(mut self, input: ::std::option::Option<crate::types::HubS3StorageConfig>) -> Self {
186        self.s3_storage_config = input;
187        self
188    }
189    /// <p>The Amazon S3 storage configuration for the hub.</p>
190    pub fn get_s3_storage_config(&self) -> &::std::option::Option<crate::types::HubS3StorageConfig> {
191        &self.s3_storage_config
192    }
193    /// <p>The status of the hub.</p>
194    /// This field is required.
195    pub fn hub_status(mut self, input: crate::types::HubStatus) -> Self {
196        self.hub_status = ::std::option::Option::Some(input);
197        self
198    }
199    /// <p>The status of the hub.</p>
200    pub fn set_hub_status(mut self, input: ::std::option::Option<crate::types::HubStatus>) -> Self {
201        self.hub_status = input;
202        self
203    }
204    /// <p>The status of the hub.</p>
205    pub fn get_hub_status(&self) -> &::std::option::Option<crate::types::HubStatus> {
206        &self.hub_status
207    }
208    /// <p>The failure reason if importing hub content failed.</p>
209    pub fn failure_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
210        self.failure_reason = ::std::option::Option::Some(input.into());
211        self
212    }
213    /// <p>The failure reason if importing hub content failed.</p>
214    pub fn set_failure_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
215        self.failure_reason = input;
216        self
217    }
218    /// <p>The failure reason if importing hub content failed.</p>
219    pub fn get_failure_reason(&self) -> &::std::option::Option<::std::string::String> {
220        &self.failure_reason
221    }
222    /// <p>The date and time that the hub was created.</p>
223    /// This field is required.
224    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
225        self.creation_time = ::std::option::Option::Some(input);
226        self
227    }
228    /// <p>The date and time that the hub was created.</p>
229    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
230        self.creation_time = input;
231        self
232    }
233    /// <p>The date and time that the hub was created.</p>
234    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
235        &self.creation_time
236    }
237    /// <p>The date and time that the hub was last modified.</p>
238    /// This field is required.
239    pub fn last_modified_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
240        self.last_modified_time = ::std::option::Option::Some(input);
241        self
242    }
243    /// <p>The date and time that the hub was last modified.</p>
244    pub fn set_last_modified_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
245        self.last_modified_time = input;
246        self
247    }
248    /// <p>The date and time that the hub was last modified.</p>
249    pub fn get_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
250        &self.last_modified_time
251    }
252    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
253        self._request_id = Some(request_id.into());
254        self
255    }
256
257    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
258        self._request_id = request_id;
259        self
260    }
261    /// Consumes the builder and constructs a [`DescribeHubOutput`](crate::operation::describe_hub::DescribeHubOutput).
262    pub fn build(self) -> crate::operation::describe_hub::DescribeHubOutput {
263        crate::operation::describe_hub::DescribeHubOutput {
264            hub_name: self.hub_name,
265            hub_arn: self.hub_arn,
266            hub_display_name: self.hub_display_name,
267            hub_description: self.hub_description,
268            hub_search_keywords: self.hub_search_keywords,
269            s3_storage_config: self.s3_storage_config,
270            hub_status: self.hub_status,
271            failure_reason: self.failure_reason,
272            creation_time: self.creation_time,
273            last_modified_time: self.last_modified_time,
274            _request_id: self._request_id,
275        }
276    }
277}