aws_sdk_connectcases/operation/get_domain/
_get_domain_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetDomainOutput {
6 pub domain_id: ::std::string::String,
8 pub domain_arn: ::std::string::String,
10 pub name: ::std::string::String,
12 pub created_time: ::aws_smithy_types::DateTime,
14 pub domain_status: crate::types::DomainStatus,
16 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::option::Option<::std::string::String>>>,
18 _request_id: Option<String>,
19}
20impl GetDomainOutput {
21 pub fn domain_id(&self) -> &str {
23 use std::ops::Deref;
24 self.domain_id.deref()
25 }
26 pub fn domain_arn(&self) -> &str {
28 use std::ops::Deref;
29 self.domain_arn.deref()
30 }
31 pub fn name(&self) -> &str {
33 use std::ops::Deref;
34 self.name.deref()
35 }
36 pub fn created_time(&self) -> &::aws_smithy_types::DateTime {
38 &self.created_time
39 }
40 pub fn domain_status(&self) -> &crate::types::DomainStatus {
42 &self.domain_status
43 }
44 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::option::Option<::std::string::String>>> {
46 self.tags.as_ref()
47 }
48}
49impl ::aws_types::request_id::RequestId for GetDomainOutput {
50 fn request_id(&self) -> Option<&str> {
51 self._request_id.as_deref()
52 }
53}
54impl GetDomainOutput {
55 pub fn builder() -> crate::operation::get_domain::builders::GetDomainOutputBuilder {
57 crate::operation::get_domain::builders::GetDomainOutputBuilder::default()
58 }
59}
60
61#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
63#[non_exhaustive]
64pub struct GetDomainOutputBuilder {
65 pub(crate) domain_id: ::std::option::Option<::std::string::String>,
66 pub(crate) domain_arn: ::std::option::Option<::std::string::String>,
67 pub(crate) name: ::std::option::Option<::std::string::String>,
68 pub(crate) created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
69 pub(crate) domain_status: ::std::option::Option<crate::types::DomainStatus>,
70 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::option::Option<::std::string::String>>>,
71 _request_id: Option<String>,
72}
73impl GetDomainOutputBuilder {
74 pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
77 self.domain_id = ::std::option::Option::Some(input.into());
78 self
79 }
80 pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
82 self.domain_id = input;
83 self
84 }
85 pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
87 &self.domain_id
88 }
89 pub fn domain_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
92 self.domain_arn = ::std::option::Option::Some(input.into());
93 self
94 }
95 pub fn set_domain_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
97 self.domain_arn = input;
98 self
99 }
100 pub fn get_domain_arn(&self) -> &::std::option::Option<::std::string::String> {
102 &self.domain_arn
103 }
104 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
107 self.name = ::std::option::Option::Some(input.into());
108 self
109 }
110 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
112 self.name = input;
113 self
114 }
115 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
117 &self.name
118 }
119 pub fn created_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
122 self.created_time = ::std::option::Option::Some(input);
123 self
124 }
125 pub fn set_created_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
127 self.created_time = input;
128 self
129 }
130 pub fn get_created_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
132 &self.created_time
133 }
134 pub fn domain_status(mut self, input: crate::types::DomainStatus) -> Self {
137 self.domain_status = ::std::option::Option::Some(input);
138 self
139 }
140 pub fn set_domain_status(mut self, input: ::std::option::Option<crate::types::DomainStatus>) -> Self {
142 self.domain_status = input;
143 self
144 }
145 pub fn get_domain_status(&self) -> &::std::option::Option<crate::types::DomainStatus> {
147 &self.domain_status
148 }
149 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::std::option::Option<::std::string::String>) -> Self {
155 let mut hash_map = self.tags.unwrap_or_default();
156 hash_map.insert(k.into(), v);
157 self.tags = ::std::option::Option::Some(hash_map);
158 self
159 }
160 pub fn set_tags(
162 mut self,
163 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::option::Option<::std::string::String>>>,
164 ) -> Self {
165 self.tags = input;
166 self
167 }
168 pub fn get_tags(
170 &self,
171 ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::option::Option<::std::string::String>>> {
172 &self.tags
173 }
174 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
175 self._request_id = Some(request_id.into());
176 self
177 }
178
179 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
180 self._request_id = request_id;
181 self
182 }
183 pub fn build(self) -> ::std::result::Result<crate::operation::get_domain::GetDomainOutput, ::aws_smithy_types::error::operation::BuildError> {
191 ::std::result::Result::Ok(crate::operation::get_domain::GetDomainOutput {
192 domain_id: self.domain_id.ok_or_else(|| {
193 ::aws_smithy_types::error::operation::BuildError::missing_field(
194 "domain_id",
195 "domain_id was not specified but it is required when building GetDomainOutput",
196 )
197 })?,
198 domain_arn: self.domain_arn.ok_or_else(|| {
199 ::aws_smithy_types::error::operation::BuildError::missing_field(
200 "domain_arn",
201 "domain_arn was not specified but it is required when building GetDomainOutput",
202 )
203 })?,
204 name: self.name.ok_or_else(|| {
205 ::aws_smithy_types::error::operation::BuildError::missing_field(
206 "name",
207 "name was not specified but it is required when building GetDomainOutput",
208 )
209 })?,
210 created_time: self.created_time.ok_or_else(|| {
211 ::aws_smithy_types::error::operation::BuildError::missing_field(
212 "created_time",
213 "created_time was not specified but it is required when building GetDomainOutput",
214 )
215 })?,
216 domain_status: self.domain_status.ok_or_else(|| {
217 ::aws_smithy_types::error::operation::BuildError::missing_field(
218 "domain_status",
219 "domain_status was not specified but it is required when building GetDomainOutput",
220 )
221 })?,
222 tags: self.tags,
223 _request_id: self._request_id,
224 })
225 }
226}