aws_sdk_dataexchange/operation/update_revision/
_update_revision_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 UpdateRevisionInput {
6    /// <p>An optional comment about the revision.</p>
7    pub comment: ::std::option::Option<::std::string::String>,
8    /// <p>The unique identifier for a data set.</p>
9    pub data_set_id: ::std::option::Option<::std::string::String>,
10    /// <p>Finalizing a revision tells AWS Data Exchange that your changes to the assets in the revision are complete. After it's in this read-only state, you can publish the revision to your products.</p>
11    pub finalized: ::std::option::Option<bool>,
12    /// <p>The unique identifier for a revision.</p>
13    pub revision_id: ::std::option::Option<::std::string::String>,
14}
15impl UpdateRevisionInput {
16    /// <p>An optional comment about the revision.</p>
17    pub fn comment(&self) -> ::std::option::Option<&str> {
18        self.comment.as_deref()
19    }
20    /// <p>The unique identifier for a data set.</p>
21    pub fn data_set_id(&self) -> ::std::option::Option<&str> {
22        self.data_set_id.as_deref()
23    }
24    /// <p>Finalizing a revision tells AWS Data Exchange that your changes to the assets in the revision are complete. After it's in this read-only state, you can publish the revision to your products.</p>
25    pub fn finalized(&self) -> ::std::option::Option<bool> {
26        self.finalized
27    }
28    /// <p>The unique identifier for a revision.</p>
29    pub fn revision_id(&self) -> ::std::option::Option<&str> {
30        self.revision_id.as_deref()
31    }
32}
33impl UpdateRevisionInput {
34    /// Creates a new builder-style object to manufacture [`UpdateRevisionInput`](crate::operation::update_revision::UpdateRevisionInput).
35    pub fn builder() -> crate::operation::update_revision::builders::UpdateRevisionInputBuilder {
36        crate::operation::update_revision::builders::UpdateRevisionInputBuilder::default()
37    }
38}
39
40/// A builder for [`UpdateRevisionInput`](crate::operation::update_revision::UpdateRevisionInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct UpdateRevisionInputBuilder {
44    pub(crate) comment: ::std::option::Option<::std::string::String>,
45    pub(crate) data_set_id: ::std::option::Option<::std::string::String>,
46    pub(crate) finalized: ::std::option::Option<bool>,
47    pub(crate) revision_id: ::std::option::Option<::std::string::String>,
48}
49impl UpdateRevisionInputBuilder {
50    /// <p>An optional comment about the revision.</p>
51    pub fn comment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
52        self.comment = ::std::option::Option::Some(input.into());
53        self
54    }
55    /// <p>An optional comment about the revision.</p>
56    pub fn set_comment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
57        self.comment = input;
58        self
59    }
60    /// <p>An optional comment about the revision.</p>
61    pub fn get_comment(&self) -> &::std::option::Option<::std::string::String> {
62        &self.comment
63    }
64    /// <p>The unique identifier for a data set.</p>
65    /// This field is required.
66    pub fn data_set_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.data_set_id = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The unique identifier for a data set.</p>
71    pub fn set_data_set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.data_set_id = input;
73        self
74    }
75    /// <p>The unique identifier for a data set.</p>
76    pub fn get_data_set_id(&self) -> &::std::option::Option<::std::string::String> {
77        &self.data_set_id
78    }
79    /// <p>Finalizing a revision tells AWS Data Exchange that your changes to the assets in the revision are complete. After it's in this read-only state, you can publish the revision to your products.</p>
80    pub fn finalized(mut self, input: bool) -> Self {
81        self.finalized = ::std::option::Option::Some(input);
82        self
83    }
84    /// <p>Finalizing a revision tells AWS Data Exchange that your changes to the assets in the revision are complete. After it's in this read-only state, you can publish the revision to your products.</p>
85    pub fn set_finalized(mut self, input: ::std::option::Option<bool>) -> Self {
86        self.finalized = input;
87        self
88    }
89    /// <p>Finalizing a revision tells AWS Data Exchange that your changes to the assets in the revision are complete. After it's in this read-only state, you can publish the revision to your products.</p>
90    pub fn get_finalized(&self) -> &::std::option::Option<bool> {
91        &self.finalized
92    }
93    /// <p>The unique identifier for a revision.</p>
94    /// This field is required.
95    pub fn revision_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96        self.revision_id = ::std::option::Option::Some(input.into());
97        self
98    }
99    /// <p>The unique identifier for a revision.</p>
100    pub fn set_revision_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101        self.revision_id = input;
102        self
103    }
104    /// <p>The unique identifier for a revision.</p>
105    pub fn get_revision_id(&self) -> &::std::option::Option<::std::string::String> {
106        &self.revision_id
107    }
108    /// Consumes the builder and constructs a [`UpdateRevisionInput`](crate::operation::update_revision::UpdateRevisionInput).
109    pub fn build(
110        self,
111    ) -> ::std::result::Result<crate::operation::update_revision::UpdateRevisionInput, ::aws_smithy_types::error::operation::BuildError> {
112        ::std::result::Result::Ok(crate::operation::update_revision::UpdateRevisionInput {
113            comment: self.comment,
114            data_set_id: self.data_set_id,
115            finalized: self.finalized,
116            revision_id: self.revision_id,
117        })
118    }
119}