aws_sdk_opensearch/types/
_change_progress_stage.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Progress details for each stage of a domain update.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ChangeProgressStage {
7    /// <p>The name of the stage.</p>
8    pub name: ::std::option::Option<::std::string::String>,
9    /// <p>The status of the stage.</p>
10    pub status: ::std::option::Option<::std::string::String>,
11    /// <p>The description of the stage.</p>
12    pub description: ::std::option::Option<::std::string::String>,
13    /// <p>The most recent updated timestamp of the stage.</p>
14    pub last_updated: ::std::option::Option<::aws_smithy_types::DateTime>,
15}
16impl ChangeProgressStage {
17    /// <p>The name of the stage.</p>
18    pub fn name(&self) -> ::std::option::Option<&str> {
19        self.name.as_deref()
20    }
21    /// <p>The status of the stage.</p>
22    pub fn status(&self) -> ::std::option::Option<&str> {
23        self.status.as_deref()
24    }
25    /// <p>The description of the stage.</p>
26    pub fn description(&self) -> ::std::option::Option<&str> {
27        self.description.as_deref()
28    }
29    /// <p>The most recent updated timestamp of the stage.</p>
30    pub fn last_updated(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
31        self.last_updated.as_ref()
32    }
33}
34impl ChangeProgressStage {
35    /// Creates a new builder-style object to manufacture [`ChangeProgressStage`](crate::types::ChangeProgressStage).
36    pub fn builder() -> crate::types::builders::ChangeProgressStageBuilder {
37        crate::types::builders::ChangeProgressStageBuilder::default()
38    }
39}
40
41/// A builder for [`ChangeProgressStage`](crate::types::ChangeProgressStage).
42#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct ChangeProgressStageBuilder {
45    pub(crate) name: ::std::option::Option<::std::string::String>,
46    pub(crate) status: ::std::option::Option<::std::string::String>,
47    pub(crate) description: ::std::option::Option<::std::string::String>,
48    pub(crate) last_updated: ::std::option::Option<::aws_smithy_types::DateTime>,
49}
50impl ChangeProgressStageBuilder {
51    /// <p>The name of the stage.</p>
52    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.name = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The name of the stage.</p>
57    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.name = input;
59        self
60    }
61    /// <p>The name of the stage.</p>
62    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
63        &self.name
64    }
65    /// <p>The status of the stage.</p>
66    pub fn status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.status = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The status of the stage.</p>
71    pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.status = input;
73        self
74    }
75    /// <p>The status of the stage.</p>
76    pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
77        &self.status
78    }
79    /// <p>The description of the stage.</p>
80    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81        self.description = ::std::option::Option::Some(input.into());
82        self
83    }
84    /// <p>The description of the stage.</p>
85    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86        self.description = input;
87        self
88    }
89    /// <p>The description of the stage.</p>
90    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
91        &self.description
92    }
93    /// <p>The most recent updated timestamp of the stage.</p>
94    pub fn last_updated(mut self, input: ::aws_smithy_types::DateTime) -> Self {
95        self.last_updated = ::std::option::Option::Some(input);
96        self
97    }
98    /// <p>The most recent updated timestamp of the stage.</p>
99    pub fn set_last_updated(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
100        self.last_updated = input;
101        self
102    }
103    /// <p>The most recent updated timestamp of the stage.</p>
104    pub fn get_last_updated(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
105        &self.last_updated
106    }
107    /// Consumes the builder and constructs a [`ChangeProgressStage`](crate::types::ChangeProgressStage).
108    pub fn build(self) -> crate::types::ChangeProgressStage {
109        crate::types::ChangeProgressStage {
110            name: self.name,
111            status: self.status,
112            description: self.description,
113            last_updated: self.last_updated,
114        }
115    }
116}