aws_sdk_iotsitewise/operation/update_dataset/
_update_dataset_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 UpdateDatasetOutput {
6    /// <p>The ID of the dataset.</p>
7    pub dataset_id: ::std::option::Option<::std::string::String>,
8    /// <p>The <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">ARN</a> of the dataset. The format is <code>arn:${Partition}:iotsitewise:${Region}:${Account}:dataset/${DatasetId}</code>.</p>
9    pub dataset_arn: ::std::option::Option<::std::string::String>,
10    /// <p>The status of the dataset. This contains the state and any error messages. State is <code>UPDATING</code> after a successfull call to this API, and any associated error message. The state is <code>ACTIVE</code> when ready to use.</p>
11    pub dataset_status: ::std::option::Option<crate::types::DatasetStatus>,
12    _request_id: Option<String>,
13}
14impl UpdateDatasetOutput {
15    /// <p>The ID of the dataset.</p>
16    pub fn dataset_id(&self) -> ::std::option::Option<&str> {
17        self.dataset_id.as_deref()
18    }
19    /// <p>The <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">ARN</a> of the dataset. The format is <code>arn:${Partition}:iotsitewise:${Region}:${Account}:dataset/${DatasetId}</code>.</p>
20    pub fn dataset_arn(&self) -> ::std::option::Option<&str> {
21        self.dataset_arn.as_deref()
22    }
23    /// <p>The status of the dataset. This contains the state and any error messages. State is <code>UPDATING</code> after a successfull call to this API, and any associated error message. The state is <code>ACTIVE</code> when ready to use.</p>
24    pub fn dataset_status(&self) -> ::std::option::Option<&crate::types::DatasetStatus> {
25        self.dataset_status.as_ref()
26    }
27}
28impl ::aws_types::request_id::RequestId for UpdateDatasetOutput {
29    fn request_id(&self) -> Option<&str> {
30        self._request_id.as_deref()
31    }
32}
33impl UpdateDatasetOutput {
34    /// Creates a new builder-style object to manufacture [`UpdateDatasetOutput`](crate::operation::update_dataset::UpdateDatasetOutput).
35    pub fn builder() -> crate::operation::update_dataset::builders::UpdateDatasetOutputBuilder {
36        crate::operation::update_dataset::builders::UpdateDatasetOutputBuilder::default()
37    }
38}
39
40/// A builder for [`UpdateDatasetOutput`](crate::operation::update_dataset::UpdateDatasetOutput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct UpdateDatasetOutputBuilder {
44    pub(crate) dataset_id: ::std::option::Option<::std::string::String>,
45    pub(crate) dataset_arn: ::std::option::Option<::std::string::String>,
46    pub(crate) dataset_status: ::std::option::Option<crate::types::DatasetStatus>,
47    _request_id: Option<String>,
48}
49impl UpdateDatasetOutputBuilder {
50    /// <p>The ID of the dataset.</p>
51    pub fn dataset_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
52        self.dataset_id = ::std::option::Option::Some(input.into());
53        self
54    }
55    /// <p>The ID of the dataset.</p>
56    pub fn set_dataset_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
57        self.dataset_id = input;
58        self
59    }
60    /// <p>The ID of the dataset.</p>
61    pub fn get_dataset_id(&self) -> &::std::option::Option<::std::string::String> {
62        &self.dataset_id
63    }
64    /// <p>The <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">ARN</a> of the dataset. The format is <code>arn:${Partition}:iotsitewise:${Region}:${Account}:dataset/${DatasetId}</code>.</p>
65    pub fn dataset_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
66        self.dataset_arn = ::std::option::Option::Some(input.into());
67        self
68    }
69    /// <p>The <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">ARN</a> of the dataset. The format is <code>arn:${Partition}:iotsitewise:${Region}:${Account}:dataset/${DatasetId}</code>.</p>
70    pub fn set_dataset_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
71        self.dataset_arn = input;
72        self
73    }
74    /// <p>The <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">ARN</a> of the dataset. The format is <code>arn:${Partition}:iotsitewise:${Region}:${Account}:dataset/${DatasetId}</code>.</p>
75    pub fn get_dataset_arn(&self) -> &::std::option::Option<::std::string::String> {
76        &self.dataset_arn
77    }
78    /// <p>The status of the dataset. This contains the state and any error messages. State is <code>UPDATING</code> after a successfull call to this API, and any associated error message. The state is <code>ACTIVE</code> when ready to use.</p>
79    pub fn dataset_status(mut self, input: crate::types::DatasetStatus) -> Self {
80        self.dataset_status = ::std::option::Option::Some(input);
81        self
82    }
83    /// <p>The status of the dataset. This contains the state and any error messages. State is <code>UPDATING</code> after a successfull call to this API, and any associated error message. The state is <code>ACTIVE</code> when ready to use.</p>
84    pub fn set_dataset_status(mut self, input: ::std::option::Option<crate::types::DatasetStatus>) -> Self {
85        self.dataset_status = input;
86        self
87    }
88    /// <p>The status of the dataset. This contains the state and any error messages. State is <code>UPDATING</code> after a successfull call to this API, and any associated error message. The state is <code>ACTIVE</code> when ready to use.</p>
89    pub fn get_dataset_status(&self) -> &::std::option::Option<crate::types::DatasetStatus> {
90        &self.dataset_status
91    }
92    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
93        self._request_id = Some(request_id.into());
94        self
95    }
96
97    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
98        self._request_id = request_id;
99        self
100    }
101    /// Consumes the builder and constructs a [`UpdateDatasetOutput`](crate::operation::update_dataset::UpdateDatasetOutput).
102    pub fn build(self) -> crate::operation::update_dataset::UpdateDatasetOutput {
103        crate::operation::update_dataset::UpdateDatasetOutput {
104            dataset_id: self.dataset_id,
105            dataset_arn: self.dataset_arn,
106            dataset_status: self.dataset_status,
107            _request_id: self._request_id,
108        }
109    }
110}