aws_sdk_iotsitewise/operation/update_dataset/
_update_dataset_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 UpdateDatasetInput {
6    /// <p>The ID of the dataset.</p>
7    pub dataset_id: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the dataset.</p>
9    pub dataset_name: ::std::option::Option<::std::string::String>,
10    /// <p>A description about the dataset, and its functionality.</p>
11    pub dataset_description: ::std::option::Option<::std::string::String>,
12    /// <p>The data source for the dataset.</p>
13    pub dataset_source: ::std::option::Option<crate::types::DatasetSource>,
14    /// <p>A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.</p>
15    pub client_token: ::std::option::Option<::std::string::String>,
16}
17impl UpdateDatasetInput {
18    /// <p>The ID of the dataset.</p>
19    pub fn dataset_id(&self) -> ::std::option::Option<&str> {
20        self.dataset_id.as_deref()
21    }
22    /// <p>The name of the dataset.</p>
23    pub fn dataset_name(&self) -> ::std::option::Option<&str> {
24        self.dataset_name.as_deref()
25    }
26    /// <p>A description about the dataset, and its functionality.</p>
27    pub fn dataset_description(&self) -> ::std::option::Option<&str> {
28        self.dataset_description.as_deref()
29    }
30    /// <p>The data source for the dataset.</p>
31    pub fn dataset_source(&self) -> ::std::option::Option<&crate::types::DatasetSource> {
32        self.dataset_source.as_ref()
33    }
34    /// <p>A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.</p>
35    pub fn client_token(&self) -> ::std::option::Option<&str> {
36        self.client_token.as_deref()
37    }
38}
39impl UpdateDatasetInput {
40    /// Creates a new builder-style object to manufacture [`UpdateDatasetInput`](crate::operation::update_dataset::UpdateDatasetInput).
41    pub fn builder() -> crate::operation::update_dataset::builders::UpdateDatasetInputBuilder {
42        crate::operation::update_dataset::builders::UpdateDatasetInputBuilder::default()
43    }
44}
45
46/// A builder for [`UpdateDatasetInput`](crate::operation::update_dataset::UpdateDatasetInput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct UpdateDatasetInputBuilder {
50    pub(crate) dataset_id: ::std::option::Option<::std::string::String>,
51    pub(crate) dataset_name: ::std::option::Option<::std::string::String>,
52    pub(crate) dataset_description: ::std::option::Option<::std::string::String>,
53    pub(crate) dataset_source: ::std::option::Option<crate::types::DatasetSource>,
54    pub(crate) client_token: ::std::option::Option<::std::string::String>,
55}
56impl UpdateDatasetInputBuilder {
57    /// <p>The ID of the dataset.</p>
58    /// This field is required.
59    pub fn dataset_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.dataset_id = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The ID of the dataset.</p>
64    pub fn set_dataset_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.dataset_id = input;
66        self
67    }
68    /// <p>The ID of the dataset.</p>
69    pub fn get_dataset_id(&self) -> &::std::option::Option<::std::string::String> {
70        &self.dataset_id
71    }
72    /// <p>The name of the dataset.</p>
73    /// This field is required.
74    pub fn dataset_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75        self.dataset_name = ::std::option::Option::Some(input.into());
76        self
77    }
78    /// <p>The name of the dataset.</p>
79    pub fn set_dataset_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80        self.dataset_name = input;
81        self
82    }
83    /// <p>The name of the dataset.</p>
84    pub fn get_dataset_name(&self) -> &::std::option::Option<::std::string::String> {
85        &self.dataset_name
86    }
87    /// <p>A description about the dataset, and its functionality.</p>
88    pub fn dataset_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
89        self.dataset_description = ::std::option::Option::Some(input.into());
90        self
91    }
92    /// <p>A description about the dataset, and its functionality.</p>
93    pub fn set_dataset_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
94        self.dataset_description = input;
95        self
96    }
97    /// <p>A description about the dataset, and its functionality.</p>
98    pub fn get_dataset_description(&self) -> &::std::option::Option<::std::string::String> {
99        &self.dataset_description
100    }
101    /// <p>The data source for the dataset.</p>
102    /// This field is required.
103    pub fn dataset_source(mut self, input: crate::types::DatasetSource) -> Self {
104        self.dataset_source = ::std::option::Option::Some(input);
105        self
106    }
107    /// <p>The data source for the dataset.</p>
108    pub fn set_dataset_source(mut self, input: ::std::option::Option<crate::types::DatasetSource>) -> Self {
109        self.dataset_source = input;
110        self
111    }
112    /// <p>The data source for the dataset.</p>
113    pub fn get_dataset_source(&self) -> &::std::option::Option<crate::types::DatasetSource> {
114        &self.dataset_source
115    }
116    /// <p>A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.</p>
117    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
118        self.client_token = ::std::option::Option::Some(input.into());
119        self
120    }
121    /// <p>A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.</p>
122    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
123        self.client_token = input;
124        self
125    }
126    /// <p>A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.</p>
127    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
128        &self.client_token
129    }
130    /// Consumes the builder and constructs a [`UpdateDatasetInput`](crate::operation::update_dataset::UpdateDatasetInput).
131    pub fn build(
132        self,
133    ) -> ::std::result::Result<crate::operation::update_dataset::UpdateDatasetInput, ::aws_smithy_types::error::operation::BuildError> {
134        ::std::result::Result::Ok(crate::operation::update_dataset::UpdateDatasetInput {
135            dataset_id: self.dataset_id,
136            dataset_name: self.dataset_name,
137            dataset_description: self.dataset_description,
138            dataset_source: self.dataset_source,
139            client_token: self.client_token,
140        })
141    }
142}