aws_sdk_directory/types/
_schema_extension_info.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Information about a schema extension.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct SchemaExtensionInfo {
7    /// <p>The identifier of the directory to which the schema extension is applied.</p>
8    pub directory_id: ::std::option::Option<::std::string::String>,
9    /// <p>The identifier of the schema extension.</p>
10    pub schema_extension_id: ::std::option::Option<::std::string::String>,
11    /// <p>A description of the schema extension.</p>
12    pub description: ::std::option::Option<::std::string::String>,
13    /// <p>The current status of the schema extension.</p>
14    pub schema_extension_status: ::std::option::Option<crate::types::SchemaExtensionStatus>,
15    /// <p>The reason for the <code>SchemaExtensionStatus</code>.</p>
16    pub schema_extension_status_reason: ::std::option::Option<::std::string::String>,
17    /// <p>The date and time that the schema extension started being applied to the directory.</p>
18    pub start_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
19    /// <p>The date and time that the schema extension was completed.</p>
20    pub end_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
21}
22impl SchemaExtensionInfo {
23    /// <p>The identifier of the directory to which the schema extension is applied.</p>
24    pub fn directory_id(&self) -> ::std::option::Option<&str> {
25        self.directory_id.as_deref()
26    }
27    /// <p>The identifier of the schema extension.</p>
28    pub fn schema_extension_id(&self) -> ::std::option::Option<&str> {
29        self.schema_extension_id.as_deref()
30    }
31    /// <p>A description of the schema extension.</p>
32    pub fn description(&self) -> ::std::option::Option<&str> {
33        self.description.as_deref()
34    }
35    /// <p>The current status of the schema extension.</p>
36    pub fn schema_extension_status(&self) -> ::std::option::Option<&crate::types::SchemaExtensionStatus> {
37        self.schema_extension_status.as_ref()
38    }
39    /// <p>The reason for the <code>SchemaExtensionStatus</code>.</p>
40    pub fn schema_extension_status_reason(&self) -> ::std::option::Option<&str> {
41        self.schema_extension_status_reason.as_deref()
42    }
43    /// <p>The date and time that the schema extension started being applied to the directory.</p>
44    pub fn start_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
45        self.start_date_time.as_ref()
46    }
47    /// <p>The date and time that the schema extension was completed.</p>
48    pub fn end_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
49        self.end_date_time.as_ref()
50    }
51}
52impl SchemaExtensionInfo {
53    /// Creates a new builder-style object to manufacture [`SchemaExtensionInfo`](crate::types::SchemaExtensionInfo).
54    pub fn builder() -> crate::types::builders::SchemaExtensionInfoBuilder {
55        crate::types::builders::SchemaExtensionInfoBuilder::default()
56    }
57}
58
59/// A builder for [`SchemaExtensionInfo`](crate::types::SchemaExtensionInfo).
60#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
61#[non_exhaustive]
62pub struct SchemaExtensionInfoBuilder {
63    pub(crate) directory_id: ::std::option::Option<::std::string::String>,
64    pub(crate) schema_extension_id: ::std::option::Option<::std::string::String>,
65    pub(crate) description: ::std::option::Option<::std::string::String>,
66    pub(crate) schema_extension_status: ::std::option::Option<crate::types::SchemaExtensionStatus>,
67    pub(crate) schema_extension_status_reason: ::std::option::Option<::std::string::String>,
68    pub(crate) start_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
69    pub(crate) end_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
70}
71impl SchemaExtensionInfoBuilder {
72    /// <p>The identifier of the directory to which the schema extension is applied.</p>
73    pub fn directory_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.directory_id = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>The identifier of the directory to which the schema extension is applied.</p>
78    pub fn set_directory_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.directory_id = input;
80        self
81    }
82    /// <p>The identifier of the directory to which the schema extension is applied.</p>
83    pub fn get_directory_id(&self) -> &::std::option::Option<::std::string::String> {
84        &self.directory_id
85    }
86    /// <p>The identifier of the schema extension.</p>
87    pub fn schema_extension_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88        self.schema_extension_id = ::std::option::Option::Some(input.into());
89        self
90    }
91    /// <p>The identifier of the schema extension.</p>
92    pub fn set_schema_extension_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93        self.schema_extension_id = input;
94        self
95    }
96    /// <p>The identifier of the schema extension.</p>
97    pub fn get_schema_extension_id(&self) -> &::std::option::Option<::std::string::String> {
98        &self.schema_extension_id
99    }
100    /// <p>A description of the schema extension.</p>
101    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102        self.description = ::std::option::Option::Some(input.into());
103        self
104    }
105    /// <p>A description of the schema extension.</p>
106    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107        self.description = input;
108        self
109    }
110    /// <p>A description of the schema extension.</p>
111    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
112        &self.description
113    }
114    /// <p>The current status of the schema extension.</p>
115    pub fn schema_extension_status(mut self, input: crate::types::SchemaExtensionStatus) -> Self {
116        self.schema_extension_status = ::std::option::Option::Some(input);
117        self
118    }
119    /// <p>The current status of the schema extension.</p>
120    pub fn set_schema_extension_status(mut self, input: ::std::option::Option<crate::types::SchemaExtensionStatus>) -> Self {
121        self.schema_extension_status = input;
122        self
123    }
124    /// <p>The current status of the schema extension.</p>
125    pub fn get_schema_extension_status(&self) -> &::std::option::Option<crate::types::SchemaExtensionStatus> {
126        &self.schema_extension_status
127    }
128    /// <p>The reason for the <code>SchemaExtensionStatus</code>.</p>
129    pub fn schema_extension_status_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
130        self.schema_extension_status_reason = ::std::option::Option::Some(input.into());
131        self
132    }
133    /// <p>The reason for the <code>SchemaExtensionStatus</code>.</p>
134    pub fn set_schema_extension_status_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135        self.schema_extension_status_reason = input;
136        self
137    }
138    /// <p>The reason for the <code>SchemaExtensionStatus</code>.</p>
139    pub fn get_schema_extension_status_reason(&self) -> &::std::option::Option<::std::string::String> {
140        &self.schema_extension_status_reason
141    }
142    /// <p>The date and time that the schema extension started being applied to the directory.</p>
143    pub fn start_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
144        self.start_date_time = ::std::option::Option::Some(input);
145        self
146    }
147    /// <p>The date and time that the schema extension started being applied to the directory.</p>
148    pub fn set_start_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
149        self.start_date_time = input;
150        self
151    }
152    /// <p>The date and time that the schema extension started being applied to the directory.</p>
153    pub fn get_start_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
154        &self.start_date_time
155    }
156    /// <p>The date and time that the schema extension was completed.</p>
157    pub fn end_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
158        self.end_date_time = ::std::option::Option::Some(input);
159        self
160    }
161    /// <p>The date and time that the schema extension was completed.</p>
162    pub fn set_end_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
163        self.end_date_time = input;
164        self
165    }
166    /// <p>The date and time that the schema extension was completed.</p>
167    pub fn get_end_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
168        &self.end_date_time
169    }
170    /// Consumes the builder and constructs a [`SchemaExtensionInfo`](crate::types::SchemaExtensionInfo).
171    pub fn build(self) -> crate::types::SchemaExtensionInfo {
172        crate::types::SchemaExtensionInfo {
173            directory_id: self.directory_id,
174            schema_extension_id: self.schema_extension_id,
175            description: self.description,
176            schema_extension_status: self.schema_extension_status,
177            schema_extension_status_reason: self.schema_extension_status_reason,
178            start_date_time: self.start_date_time,
179            end_date_time: self.end_date_time,
180        }
181    }
182}