aws_sdk_neptunegraph/operation/start_graph/
_start_graph_output.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 StartGraphOutput {
6    /// <p>The unique identifier of the graph.</p>
7    pub id: ::std::string::String,
8    /// <p>The name of the graph.</p>
9    pub name: ::std::string::String,
10    /// <p>The ARN associated with the graph.</p>
11    pub arn: ::std::string::String,
12    /// <p>The status of the graph.</p>
13    pub status: ::std::option::Option<crate::types::GraphStatus>,
14    /// <p>The reason that the graph has this status.</p>
15    pub status_reason: ::std::option::Option<::std::string::String>,
16    /// <p>The time at which the graph was created.</p>
17    pub create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
18    /// <p>The number of memory-optimized Neptune Capacity Units (m-NCUs) allocated to the graph.</p>
19    pub provisioned_memory: ::std::option::Option<i32>,
20    /// <p>The graph endpoint.</p>
21    pub endpoint: ::std::option::Option<::std::string::String>,
22    /// <p>If <code>true</code>, the graph has a public endpoint, otherwise not.</p>
23    pub public_connectivity: ::std::option::Option<bool>,
24    /// <p>Specifies the number of dimensions for vector embeddings loaded into the graph. Max = 65535</p>
25    pub vector_search_configuration: ::std::option::Option<crate::types::VectorSearchConfiguration>,
26    /// <p>The number of replicas for the graph.</p>
27    pub replica_count: ::std::option::Option<i32>,
28    /// <p>The ID of the KMS key used to encrypt and decrypt graph data.</p>
29    pub kms_key_identifier: ::std::option::Option<::std::string::String>,
30    /// <p>The ID of the snapshot from which the graph was created, if it was created from a snapshot.</p>
31    pub source_snapshot_id: ::std::option::Option<::std::string::String>,
32    /// <p>If <code>true</code>, deletion protection is enabled for the graph.</p>
33    pub deletion_protection: ::std::option::Option<bool>,
34    /// <p>The build number of the graph.</p>
35    pub build_number: ::std::option::Option<::std::string::String>,
36    _request_id: Option<String>,
37}
38impl StartGraphOutput {
39    /// <p>The unique identifier of the graph.</p>
40    pub fn id(&self) -> &str {
41        use std::ops::Deref;
42        self.id.deref()
43    }
44    /// <p>The name of the graph.</p>
45    pub fn name(&self) -> &str {
46        use std::ops::Deref;
47        self.name.deref()
48    }
49    /// <p>The ARN associated with the graph.</p>
50    pub fn arn(&self) -> &str {
51        use std::ops::Deref;
52        self.arn.deref()
53    }
54    /// <p>The status of the graph.</p>
55    pub fn status(&self) -> ::std::option::Option<&crate::types::GraphStatus> {
56        self.status.as_ref()
57    }
58    /// <p>The reason that the graph has this status.</p>
59    pub fn status_reason(&self) -> ::std::option::Option<&str> {
60        self.status_reason.as_deref()
61    }
62    /// <p>The time at which the graph was created.</p>
63    pub fn create_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
64        self.create_time.as_ref()
65    }
66    /// <p>The number of memory-optimized Neptune Capacity Units (m-NCUs) allocated to the graph.</p>
67    pub fn provisioned_memory(&self) -> ::std::option::Option<i32> {
68        self.provisioned_memory
69    }
70    /// <p>The graph endpoint.</p>
71    pub fn endpoint(&self) -> ::std::option::Option<&str> {
72        self.endpoint.as_deref()
73    }
74    /// <p>If <code>true</code>, the graph has a public endpoint, otherwise not.</p>
75    pub fn public_connectivity(&self) -> ::std::option::Option<bool> {
76        self.public_connectivity
77    }
78    /// <p>Specifies the number of dimensions for vector embeddings loaded into the graph. Max = 65535</p>
79    pub fn vector_search_configuration(&self) -> ::std::option::Option<&crate::types::VectorSearchConfiguration> {
80        self.vector_search_configuration.as_ref()
81    }
82    /// <p>The number of replicas for the graph.</p>
83    pub fn replica_count(&self) -> ::std::option::Option<i32> {
84        self.replica_count
85    }
86    /// <p>The ID of the KMS key used to encrypt and decrypt graph data.</p>
87    pub fn kms_key_identifier(&self) -> ::std::option::Option<&str> {
88        self.kms_key_identifier.as_deref()
89    }
90    /// <p>The ID of the snapshot from which the graph was created, if it was created from a snapshot.</p>
91    pub fn source_snapshot_id(&self) -> ::std::option::Option<&str> {
92        self.source_snapshot_id.as_deref()
93    }
94    /// <p>If <code>true</code>, deletion protection is enabled for the graph.</p>
95    pub fn deletion_protection(&self) -> ::std::option::Option<bool> {
96        self.deletion_protection
97    }
98    /// <p>The build number of the graph.</p>
99    pub fn build_number(&self) -> ::std::option::Option<&str> {
100        self.build_number.as_deref()
101    }
102}
103impl ::aws_types::request_id::RequestId for StartGraphOutput {
104    fn request_id(&self) -> Option<&str> {
105        self._request_id.as_deref()
106    }
107}
108impl StartGraphOutput {
109    /// Creates a new builder-style object to manufacture [`StartGraphOutput`](crate::operation::start_graph::StartGraphOutput).
110    pub fn builder() -> crate::operation::start_graph::builders::StartGraphOutputBuilder {
111        crate::operation::start_graph::builders::StartGraphOutputBuilder::default()
112    }
113}
114
115/// A builder for [`StartGraphOutput`](crate::operation::start_graph::StartGraphOutput).
116#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
117#[non_exhaustive]
118pub struct StartGraphOutputBuilder {
119    pub(crate) id: ::std::option::Option<::std::string::String>,
120    pub(crate) name: ::std::option::Option<::std::string::String>,
121    pub(crate) arn: ::std::option::Option<::std::string::String>,
122    pub(crate) status: ::std::option::Option<crate::types::GraphStatus>,
123    pub(crate) status_reason: ::std::option::Option<::std::string::String>,
124    pub(crate) create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
125    pub(crate) provisioned_memory: ::std::option::Option<i32>,
126    pub(crate) endpoint: ::std::option::Option<::std::string::String>,
127    pub(crate) public_connectivity: ::std::option::Option<bool>,
128    pub(crate) vector_search_configuration: ::std::option::Option<crate::types::VectorSearchConfiguration>,
129    pub(crate) replica_count: ::std::option::Option<i32>,
130    pub(crate) kms_key_identifier: ::std::option::Option<::std::string::String>,
131    pub(crate) source_snapshot_id: ::std::option::Option<::std::string::String>,
132    pub(crate) deletion_protection: ::std::option::Option<bool>,
133    pub(crate) build_number: ::std::option::Option<::std::string::String>,
134    _request_id: Option<String>,
135}
136impl StartGraphOutputBuilder {
137    /// <p>The unique identifier of the graph.</p>
138    /// This field is required.
139    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
140        self.id = ::std::option::Option::Some(input.into());
141        self
142    }
143    /// <p>The unique identifier of the graph.</p>
144    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
145        self.id = input;
146        self
147    }
148    /// <p>The unique identifier of the graph.</p>
149    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
150        &self.id
151    }
152    /// <p>The name of the graph.</p>
153    /// This field is required.
154    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
155        self.name = ::std::option::Option::Some(input.into());
156        self
157    }
158    /// <p>The name of the graph.</p>
159    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
160        self.name = input;
161        self
162    }
163    /// <p>The name of the graph.</p>
164    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
165        &self.name
166    }
167    /// <p>The ARN associated with the graph.</p>
168    /// This field is required.
169    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
170        self.arn = ::std::option::Option::Some(input.into());
171        self
172    }
173    /// <p>The ARN associated with the graph.</p>
174    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
175        self.arn = input;
176        self
177    }
178    /// <p>The ARN associated with the graph.</p>
179    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
180        &self.arn
181    }
182    /// <p>The status of the graph.</p>
183    pub fn status(mut self, input: crate::types::GraphStatus) -> Self {
184        self.status = ::std::option::Option::Some(input);
185        self
186    }
187    /// <p>The status of the graph.</p>
188    pub fn set_status(mut self, input: ::std::option::Option<crate::types::GraphStatus>) -> Self {
189        self.status = input;
190        self
191    }
192    /// <p>The status of the graph.</p>
193    pub fn get_status(&self) -> &::std::option::Option<crate::types::GraphStatus> {
194        &self.status
195    }
196    /// <p>The reason that the graph has this status.</p>
197    pub fn status_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
198        self.status_reason = ::std::option::Option::Some(input.into());
199        self
200    }
201    /// <p>The reason that the graph has this status.</p>
202    pub fn set_status_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
203        self.status_reason = input;
204        self
205    }
206    /// <p>The reason that the graph has this status.</p>
207    pub fn get_status_reason(&self) -> &::std::option::Option<::std::string::String> {
208        &self.status_reason
209    }
210    /// <p>The time at which the graph was created.</p>
211    pub fn create_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
212        self.create_time = ::std::option::Option::Some(input);
213        self
214    }
215    /// <p>The time at which the graph was created.</p>
216    pub fn set_create_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
217        self.create_time = input;
218        self
219    }
220    /// <p>The time at which the graph was created.</p>
221    pub fn get_create_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
222        &self.create_time
223    }
224    /// <p>The number of memory-optimized Neptune Capacity Units (m-NCUs) allocated to the graph.</p>
225    pub fn provisioned_memory(mut self, input: i32) -> Self {
226        self.provisioned_memory = ::std::option::Option::Some(input);
227        self
228    }
229    /// <p>The number of memory-optimized Neptune Capacity Units (m-NCUs) allocated to the graph.</p>
230    pub fn set_provisioned_memory(mut self, input: ::std::option::Option<i32>) -> Self {
231        self.provisioned_memory = input;
232        self
233    }
234    /// <p>The number of memory-optimized Neptune Capacity Units (m-NCUs) allocated to the graph.</p>
235    pub fn get_provisioned_memory(&self) -> &::std::option::Option<i32> {
236        &self.provisioned_memory
237    }
238    /// <p>The graph endpoint.</p>
239    pub fn endpoint(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
240        self.endpoint = ::std::option::Option::Some(input.into());
241        self
242    }
243    /// <p>The graph endpoint.</p>
244    pub fn set_endpoint(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
245        self.endpoint = input;
246        self
247    }
248    /// <p>The graph endpoint.</p>
249    pub fn get_endpoint(&self) -> &::std::option::Option<::std::string::String> {
250        &self.endpoint
251    }
252    /// <p>If <code>true</code>, the graph has a public endpoint, otherwise not.</p>
253    pub fn public_connectivity(mut self, input: bool) -> Self {
254        self.public_connectivity = ::std::option::Option::Some(input);
255        self
256    }
257    /// <p>If <code>true</code>, the graph has a public endpoint, otherwise not.</p>
258    pub fn set_public_connectivity(mut self, input: ::std::option::Option<bool>) -> Self {
259        self.public_connectivity = input;
260        self
261    }
262    /// <p>If <code>true</code>, the graph has a public endpoint, otherwise not.</p>
263    pub fn get_public_connectivity(&self) -> &::std::option::Option<bool> {
264        &self.public_connectivity
265    }
266    /// <p>Specifies the number of dimensions for vector embeddings loaded into the graph. Max = 65535</p>
267    pub fn vector_search_configuration(mut self, input: crate::types::VectorSearchConfiguration) -> Self {
268        self.vector_search_configuration = ::std::option::Option::Some(input);
269        self
270    }
271    /// <p>Specifies the number of dimensions for vector embeddings loaded into the graph. Max = 65535</p>
272    pub fn set_vector_search_configuration(mut self, input: ::std::option::Option<crate::types::VectorSearchConfiguration>) -> Self {
273        self.vector_search_configuration = input;
274        self
275    }
276    /// <p>Specifies the number of dimensions for vector embeddings loaded into the graph. Max = 65535</p>
277    pub fn get_vector_search_configuration(&self) -> &::std::option::Option<crate::types::VectorSearchConfiguration> {
278        &self.vector_search_configuration
279    }
280    /// <p>The number of replicas for the graph.</p>
281    pub fn replica_count(mut self, input: i32) -> Self {
282        self.replica_count = ::std::option::Option::Some(input);
283        self
284    }
285    /// <p>The number of replicas for the graph.</p>
286    pub fn set_replica_count(mut self, input: ::std::option::Option<i32>) -> Self {
287        self.replica_count = input;
288        self
289    }
290    /// <p>The number of replicas for the graph.</p>
291    pub fn get_replica_count(&self) -> &::std::option::Option<i32> {
292        &self.replica_count
293    }
294    /// <p>The ID of the KMS key used to encrypt and decrypt graph data.</p>
295    pub fn kms_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
296        self.kms_key_identifier = ::std::option::Option::Some(input.into());
297        self
298    }
299    /// <p>The ID of the KMS key used to encrypt and decrypt graph data.</p>
300    pub fn set_kms_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
301        self.kms_key_identifier = input;
302        self
303    }
304    /// <p>The ID of the KMS key used to encrypt and decrypt graph data.</p>
305    pub fn get_kms_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
306        &self.kms_key_identifier
307    }
308    /// <p>The ID of the snapshot from which the graph was created, if it was created from a snapshot.</p>
309    pub fn source_snapshot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
310        self.source_snapshot_id = ::std::option::Option::Some(input.into());
311        self
312    }
313    /// <p>The ID of the snapshot from which the graph was created, if it was created from a snapshot.</p>
314    pub fn set_source_snapshot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
315        self.source_snapshot_id = input;
316        self
317    }
318    /// <p>The ID of the snapshot from which the graph was created, if it was created from a snapshot.</p>
319    pub fn get_source_snapshot_id(&self) -> &::std::option::Option<::std::string::String> {
320        &self.source_snapshot_id
321    }
322    /// <p>If <code>true</code>, deletion protection is enabled for the graph.</p>
323    pub fn deletion_protection(mut self, input: bool) -> Self {
324        self.deletion_protection = ::std::option::Option::Some(input);
325        self
326    }
327    /// <p>If <code>true</code>, deletion protection is enabled for the graph.</p>
328    pub fn set_deletion_protection(mut self, input: ::std::option::Option<bool>) -> Self {
329        self.deletion_protection = input;
330        self
331    }
332    /// <p>If <code>true</code>, deletion protection is enabled for the graph.</p>
333    pub fn get_deletion_protection(&self) -> &::std::option::Option<bool> {
334        &self.deletion_protection
335    }
336    /// <p>The build number of the graph.</p>
337    pub fn build_number(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
338        self.build_number = ::std::option::Option::Some(input.into());
339        self
340    }
341    /// <p>The build number of the graph.</p>
342    pub fn set_build_number(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
343        self.build_number = input;
344        self
345    }
346    /// <p>The build number of the graph.</p>
347    pub fn get_build_number(&self) -> &::std::option::Option<::std::string::String> {
348        &self.build_number
349    }
350    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
351        self._request_id = Some(request_id.into());
352        self
353    }
354
355    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
356        self._request_id = request_id;
357        self
358    }
359    /// Consumes the builder and constructs a [`StartGraphOutput`](crate::operation::start_graph::StartGraphOutput).
360    /// This method will fail if any of the following fields are not set:
361    /// - [`id`](crate::operation::start_graph::builders::StartGraphOutputBuilder::id)
362    /// - [`name`](crate::operation::start_graph::builders::StartGraphOutputBuilder::name)
363    /// - [`arn`](crate::operation::start_graph::builders::StartGraphOutputBuilder::arn)
364    pub fn build(self) -> ::std::result::Result<crate::operation::start_graph::StartGraphOutput, ::aws_smithy_types::error::operation::BuildError> {
365        ::std::result::Result::Ok(crate::operation::start_graph::StartGraphOutput {
366            id: self.id.ok_or_else(|| {
367                ::aws_smithy_types::error::operation::BuildError::missing_field(
368                    "id",
369                    "id was not specified but it is required when building StartGraphOutput",
370                )
371            })?,
372            name: self.name.ok_or_else(|| {
373                ::aws_smithy_types::error::operation::BuildError::missing_field(
374                    "name",
375                    "name was not specified but it is required when building StartGraphOutput",
376                )
377            })?,
378            arn: self.arn.ok_or_else(|| {
379                ::aws_smithy_types::error::operation::BuildError::missing_field(
380                    "arn",
381                    "arn was not specified but it is required when building StartGraphOutput",
382                )
383            })?,
384            status: self.status,
385            status_reason: self.status_reason,
386            create_time: self.create_time,
387            provisioned_memory: self.provisioned_memory,
388            endpoint: self.endpoint,
389            public_connectivity: self.public_connectivity,
390            vector_search_configuration: self.vector_search_configuration,
391            replica_count: self.replica_count,
392            kms_key_identifier: self.kms_key_identifier,
393            source_snapshot_id: self.source_snapshot_id,
394            deletion_protection: self.deletion_protection,
395            build_number: self.build_number,
396            _request_id: self._request_id,
397        })
398    }
399}