aws_sdk_neptunegraph/operation/create_graph/
_create_graph_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateGraphOutput {
6 pub id: ::std::string::String,
8 pub name: ::std::string::String,
11 pub arn: ::std::string::String,
13 pub status: ::std::option::Option<crate::types::GraphStatus>,
15 pub status_reason: ::std::option::Option<::std::string::String>,
17 pub create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
19 pub provisioned_memory: ::std::option::Option<i32>,
22 pub endpoint: ::std::option::Option<::std::string::String>,
24 pub public_connectivity: ::std::option::Option<bool>,
28 pub vector_search_configuration: ::std::option::Option<crate::types::VectorSearchConfiguration>,
30 pub replica_count: ::std::option::Option<i32>,
33 pub kms_key_identifier: ::std::option::Option<::std::string::String>,
35 pub source_snapshot_id: ::std::option::Option<::std::string::String>,
37 pub deletion_protection: ::std::option::Option<bool>,
39 pub build_number: ::std::option::Option<::std::string::String>,
41 _request_id: Option<String>,
42}
43impl CreateGraphOutput {
44 pub fn id(&self) -> &str {
46 use std::ops::Deref;
47 self.id.deref()
48 }
49 pub fn name(&self) -> &str {
52 use std::ops::Deref;
53 self.name.deref()
54 }
55 pub fn arn(&self) -> &str {
57 use std::ops::Deref;
58 self.arn.deref()
59 }
60 pub fn status(&self) -> ::std::option::Option<&crate::types::GraphStatus> {
62 self.status.as_ref()
63 }
64 pub fn status_reason(&self) -> ::std::option::Option<&str> {
66 self.status_reason.as_deref()
67 }
68 pub fn create_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
70 self.create_time.as_ref()
71 }
72 pub fn provisioned_memory(&self) -> ::std::option::Option<i32> {
75 self.provisioned_memory
76 }
77 pub fn endpoint(&self) -> ::std::option::Option<&str> {
79 self.endpoint.as_deref()
80 }
81 pub fn public_connectivity(&self) -> ::std::option::Option<bool> {
85 self.public_connectivity
86 }
87 pub fn vector_search_configuration(&self) -> ::std::option::Option<&crate::types::VectorSearchConfiguration> {
89 self.vector_search_configuration.as_ref()
90 }
91 pub fn replica_count(&self) -> ::std::option::Option<i32> {
94 self.replica_count
95 }
96 pub fn kms_key_identifier(&self) -> ::std::option::Option<&str> {
98 self.kms_key_identifier.as_deref()
99 }
100 pub fn source_snapshot_id(&self) -> ::std::option::Option<&str> {
102 self.source_snapshot_id.as_deref()
103 }
104 pub fn deletion_protection(&self) -> ::std::option::Option<bool> {
106 self.deletion_protection
107 }
108 pub fn build_number(&self) -> ::std::option::Option<&str> {
110 self.build_number.as_deref()
111 }
112}
113impl ::aws_types::request_id::RequestId for CreateGraphOutput {
114 fn request_id(&self) -> Option<&str> {
115 self._request_id.as_deref()
116 }
117}
118impl CreateGraphOutput {
119 pub fn builder() -> crate::operation::create_graph::builders::CreateGraphOutputBuilder {
121 crate::operation::create_graph::builders::CreateGraphOutputBuilder::default()
122 }
123}
124
125#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
127#[non_exhaustive]
128pub struct CreateGraphOutputBuilder {
129 pub(crate) id: ::std::option::Option<::std::string::String>,
130 pub(crate) name: ::std::option::Option<::std::string::String>,
131 pub(crate) arn: ::std::option::Option<::std::string::String>,
132 pub(crate) status: ::std::option::Option<crate::types::GraphStatus>,
133 pub(crate) status_reason: ::std::option::Option<::std::string::String>,
134 pub(crate) create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
135 pub(crate) provisioned_memory: ::std::option::Option<i32>,
136 pub(crate) endpoint: ::std::option::Option<::std::string::String>,
137 pub(crate) public_connectivity: ::std::option::Option<bool>,
138 pub(crate) vector_search_configuration: ::std::option::Option<crate::types::VectorSearchConfiguration>,
139 pub(crate) replica_count: ::std::option::Option<i32>,
140 pub(crate) kms_key_identifier: ::std::option::Option<::std::string::String>,
141 pub(crate) source_snapshot_id: ::std::option::Option<::std::string::String>,
142 pub(crate) deletion_protection: ::std::option::Option<bool>,
143 pub(crate) build_number: ::std::option::Option<::std::string::String>,
144 _request_id: Option<String>,
145}
146impl CreateGraphOutputBuilder {
147 pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150 self.id = ::std::option::Option::Some(input.into());
151 self
152 }
153 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155 self.id = input;
156 self
157 }
158 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
160 &self.id
161 }
162 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
166 self.name = ::std::option::Option::Some(input.into());
167 self
168 }
169 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
172 self.name = input;
173 self
174 }
175 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
178 &self.name
179 }
180 pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
183 self.arn = ::std::option::Option::Some(input.into());
184 self
185 }
186 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
188 self.arn = input;
189 self
190 }
191 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
193 &self.arn
194 }
195 pub fn status(mut self, input: crate::types::GraphStatus) -> Self {
197 self.status = ::std::option::Option::Some(input);
198 self
199 }
200 pub fn set_status(mut self, input: ::std::option::Option<crate::types::GraphStatus>) -> Self {
202 self.status = input;
203 self
204 }
205 pub fn get_status(&self) -> &::std::option::Option<crate::types::GraphStatus> {
207 &self.status
208 }
209 pub fn status_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
211 self.status_reason = ::std::option::Option::Some(input.into());
212 self
213 }
214 pub fn set_status_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
216 self.status_reason = input;
217 self
218 }
219 pub fn get_status_reason(&self) -> &::std::option::Option<::std::string::String> {
221 &self.status_reason
222 }
223 pub fn create_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
225 self.create_time = ::std::option::Option::Some(input);
226 self
227 }
228 pub fn set_create_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
230 self.create_time = input;
231 self
232 }
233 pub fn get_create_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
235 &self.create_time
236 }
237 pub fn provisioned_memory(mut self, input: i32) -> Self {
240 self.provisioned_memory = ::std::option::Option::Some(input);
241 self
242 }
243 pub fn set_provisioned_memory(mut self, input: ::std::option::Option<i32>) -> Self {
246 self.provisioned_memory = input;
247 self
248 }
249 pub fn get_provisioned_memory(&self) -> &::std::option::Option<i32> {
252 &self.provisioned_memory
253 }
254 pub fn endpoint(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
256 self.endpoint = ::std::option::Option::Some(input.into());
257 self
258 }
259 pub fn set_endpoint(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
261 self.endpoint = input;
262 self
263 }
264 pub fn get_endpoint(&self) -> &::std::option::Option<::std::string::String> {
266 &self.endpoint
267 }
268 pub fn public_connectivity(mut self, input: bool) -> Self {
272 self.public_connectivity = ::std::option::Option::Some(input);
273 self
274 }
275 pub fn set_public_connectivity(mut self, input: ::std::option::Option<bool>) -> Self {
279 self.public_connectivity = input;
280 self
281 }
282 pub fn get_public_connectivity(&self) -> &::std::option::Option<bool> {
286 &self.public_connectivity
287 }
288 pub fn vector_search_configuration(mut self, input: crate::types::VectorSearchConfiguration) -> Self {
290 self.vector_search_configuration = ::std::option::Option::Some(input);
291 self
292 }
293 pub fn set_vector_search_configuration(mut self, input: ::std::option::Option<crate::types::VectorSearchConfiguration>) -> Self {
295 self.vector_search_configuration = input;
296 self
297 }
298 pub fn get_vector_search_configuration(&self) -> &::std::option::Option<crate::types::VectorSearchConfiguration> {
300 &self.vector_search_configuration
301 }
302 pub fn replica_count(mut self, input: i32) -> Self {
305 self.replica_count = ::std::option::Option::Some(input);
306 self
307 }
308 pub fn set_replica_count(mut self, input: ::std::option::Option<i32>) -> Self {
311 self.replica_count = input;
312 self
313 }
314 pub fn get_replica_count(&self) -> &::std::option::Option<i32> {
317 &self.replica_count
318 }
319 pub fn kms_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
321 self.kms_key_identifier = ::std::option::Option::Some(input.into());
322 self
323 }
324 pub fn set_kms_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
326 self.kms_key_identifier = input;
327 self
328 }
329 pub fn get_kms_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
331 &self.kms_key_identifier
332 }
333 pub fn source_snapshot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
335 self.source_snapshot_id = ::std::option::Option::Some(input.into());
336 self
337 }
338 pub fn set_source_snapshot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
340 self.source_snapshot_id = input;
341 self
342 }
343 pub fn get_source_snapshot_id(&self) -> &::std::option::Option<::std::string::String> {
345 &self.source_snapshot_id
346 }
347 pub fn deletion_protection(mut self, input: bool) -> Self {
349 self.deletion_protection = ::std::option::Option::Some(input);
350 self
351 }
352 pub fn set_deletion_protection(mut self, input: ::std::option::Option<bool>) -> Self {
354 self.deletion_protection = input;
355 self
356 }
357 pub fn get_deletion_protection(&self) -> &::std::option::Option<bool> {
359 &self.deletion_protection
360 }
361 pub fn build_number(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
363 self.build_number = ::std::option::Option::Some(input.into());
364 self
365 }
366 pub fn set_build_number(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
368 self.build_number = input;
369 self
370 }
371 pub fn get_build_number(&self) -> &::std::option::Option<::std::string::String> {
373 &self.build_number
374 }
375 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
376 self._request_id = Some(request_id.into());
377 self
378 }
379
380 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
381 self._request_id = request_id;
382 self
383 }
384 pub fn build(self) -> ::std::result::Result<crate::operation::create_graph::CreateGraphOutput, ::aws_smithy_types::error::operation::BuildError> {
390 ::std::result::Result::Ok(crate::operation::create_graph::CreateGraphOutput {
391 id: self.id.ok_or_else(|| {
392 ::aws_smithy_types::error::operation::BuildError::missing_field(
393 "id",
394 "id was not specified but it is required when building CreateGraphOutput",
395 )
396 })?,
397 name: self.name.ok_or_else(|| {
398 ::aws_smithy_types::error::operation::BuildError::missing_field(
399 "name",
400 "name was not specified but it is required when building CreateGraphOutput",
401 )
402 })?,
403 arn: self.arn.ok_or_else(|| {
404 ::aws_smithy_types::error::operation::BuildError::missing_field(
405 "arn",
406 "arn was not specified but it is required when building CreateGraphOutput",
407 )
408 })?,
409 status: self.status,
410 status_reason: self.status_reason,
411 create_time: self.create_time,
412 provisioned_memory: self.provisioned_memory,
413 endpoint: self.endpoint,
414 public_connectivity: self.public_connectivity,
415 vector_search_configuration: self.vector_search_configuration,
416 replica_count: self.replica_count,
417 kms_key_identifier: self.kms_key_identifier,
418 source_snapshot_id: self.source_snapshot_id,
419 deletion_protection: self.deletion_protection,
420 build_number: self.build_number,
421 _request_id: self._request_id,
422 })
423 }
424}